diff options
Diffstat (limited to 'spec/factories/usage_data.rb')
-rw-r--r-- | spec/factories/usage_data.rb | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/spec/factories/usage_data.rb b/spec/factories/usage_data.rb index 86799af1719..316e0c2b8d6 100644 --- a/spec/factories/usage_data.rb +++ b/spec/factories/usage_data.rb @@ -5,8 +5,7 @@ FactoryBot.define do skip_create # non-model factories (i.e. without #save) initialize_with do - projects = create_list(:project, 3) - projects << create(:project, :repository) + projects = create_list(:project, 4, :repository) group = create(:group) create(:board, project: projects[0]) create(:jira_integration, project: projects[0]) @@ -19,16 +18,21 @@ FactoryBot.define do create(:jira_import_state, :finished, project: projects[1], label: jira_label, imported_issues_count: 3) create(:jira_import_state, :scheduled, project: projects[1], label: jira_label) create(:prometheus_integration, project: projects[1]) - create(:integration, project: projects[1], type: 'JenkinsService', active: true) - create(:integration, project: projects[0], type: 'SlackSlashCommandsService', active: true) - create(:integration, project: projects[1], type: 'SlackService', active: true) - create(:integration, project: projects[2], type: 'SlackService', active: true) - create(:integration, project: projects[2], type: 'MattermostService', active: false) - create(:integration, group: group, project: nil, type: 'MattermostService', active: true) - mattermost_instance = create(:integration, :instance, type: 'MattermostService', active: true) - create(:integration, project: projects[1], type: 'MattermostService', active: true, inherit_from_id: mattermost_instance.id) - create(:integration, group: group, project: nil, type: 'SlackService', active: true, inherit_from_id: mattermost_instance.id) - create(:integration, project: projects[2], type: 'CustomIssueTrackerService', active: true) + create(:jenkins_integration, project: projects[1]) + + # slack + create(:slack_slash_commands_integration, project: projects[0]) + create(:integrations_slack, project: projects[1]) + create(:integrations_slack, project: projects[2]) + + # mattermost + create(:mattermost_integration, project: projects[2], active: false) + create(:mattermost_integration, group: group, project: nil) + mattermost_instance = create(:mattermost_integration, :instance) + create(:mattermost_integration, project: projects[1], inherit_from_id: mattermost_instance.id) + create(:integrations_slack, group: group, project: nil, active: true, inherit_from_id: mattermost_instance.id) + + create(:custom_issue_tracker_integration, project: projects[2], active: true) create(:project_error_tracking_setting, project: projects[0]) create(:project_error_tracking_setting, project: projects[1], enabled: false) alert_bot_issues = create_list(:incident, 2, project: projects[0], author: User.alert_bot) |