Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 21:09:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-14 21:09:54 +0300
commitf697dc5e76dfc5894df006d53b2b7e751653cf05 (patch)
tree1387cd225039e611f3683f96b318bb17d4c422cb /spec/services
parent874ead9c3a50de4c4ca4551eaf5b7eb976d26b50 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/jira_import/start_import_service_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/services/jira_import/start_import_service_spec.rb b/spec/services/jira_import/start_import_service_spec.rb
index 785f8b6d792..ae0c4f63fee 100644
--- a/spec/services/jira_import/start_import_service_spec.rb
+++ b/spec/services/jira_import/start_import_service_spec.rb
@@ -81,6 +81,28 @@ describe JiraImport::StartImportService do
expect(jira_import.jira_project_key).to eq(fake_key)
expect(jira_import.user).to eq(user)
end
+
+ it 'creates jira import label' do
+ expect { subject }.to change { Label.count }.by(1)
+ end
+
+ it 'creates jira label title with correct number' do
+ jira_import = subject.payload[:import_data]
+
+ label_title = "jira-import::#{jira_import.jira_project_key}-1"
+ expect(jira_import.label.title).to eq(label_title)
+ end
+
+ context 'when multiple jira imports for same jira project' do
+ let!(:jira_imports) { create_list(:jira_import_state, 3, :finished, project: project, jira_project_key: fake_key)}
+
+ it 'creates jira label title with correct number' do
+ jira_import = subject.payload[:import_data]
+
+ label_title = "jira-import::#{jira_import.jira_project_key}-4"
+ expect(jira_import.label.title).to eq(label_title)
+ end
+ end
end
end
end