Commit e1e823c2 authored by charlieablett's avatar charlieablett

Make Jira capitalisation consistent

- Change from `jira` to `Jira` in specs
parent 45183ce3
......@@ -63,7 +63,7 @@ describe Projects::Import::JiraController do
stub_feature_flags(jira_issue_import_vue: false)
end
context 'when jira service is enabled for the project' do
context 'when Jira service is enabled for the project' do
let_it_be(:jira_service) { create(:jira_service, project: project) }
context 'when user is developer' do
......@@ -79,7 +79,7 @@ describe Projects::Import::JiraController do
get :show, params: { namespace_id: project.namespace.to_param, project_id: project }
end
it 'does not query jira service' do
it 'does not query Jira service' do
expect(project).not_to receive(:jira_service)
end
......@@ -118,7 +118,7 @@ describe Projects::Import::JiraController do
end
end
context 'when running jira import first time' do
context 'when running Jira import first time' do
context 'get show' do
before do
allow(JIRA::Resource::Project).to receive(:all).and_return(jira_projects)
......@@ -147,7 +147,7 @@ describe Projects::Import::JiraController do
end
context 'post import' do
context 'when jira project key is empty' do
context 'when Jira project key is empty' do
it 'redirects back to show with an error' do
post :import, params: { namespace_id: project.namespace, project_id: project, jira_project_key: '' }
......@@ -197,7 +197,7 @@ describe Projects::Import::JiraController do
end
end
context 'when jira import ran before' do
context 'when Jira import ran before' do
let_it_be(:jira_import_state) { create(:jira_import_state, :finished, project: project, jira_project_key: jira_project_key) }
context 'get show' do
......
......@@ -16,7 +16,7 @@ describe Resolvers::Projects::JiraImportsResolver do
context 'when anonymous user' do
let(:current_user) { nil }
it_behaves_like 'no jira import access'
it_behaves_like 'no Jira import access'
end
end
......@@ -25,7 +25,7 @@ describe Resolvers::Projects::JiraImportsResolver do
project.add_guest(user)
end
it_behaves_like 'no jira import data present'
it_behaves_like 'no Jira import data present'
it 'does not raise access error' do
expect do
......@@ -47,14 +47,14 @@ describe Resolvers::Projects::JiraImportsResolver do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'no jira import access'
it_behaves_like 'no Jira import access'
end
context 'when user cannot read Jira imports' do
context 'when anonymous user' do
let(:current_user) { nil }
it_behaves_like 'no jira import access'
it_behaves_like 'no Jira import access'
end
end
......
......@@ -90,7 +90,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'with jira service' do
context 'with Jira service' do
let!(:service) do
services.create(id: 10, type: 'JiraService', title: nil, properties: jira_properties.to_json, category: 'issue_tracker')
end
......@@ -202,7 +202,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'with jira service which has data fields record inconsistent with properties field' do
context 'with Jira service which has data fields record inconsistent with properties field' do
let!(:service) do
services.create(id: 16, type: 'CustomIssueTrackerService', description: 'Existing description', properties: jira_properties.to_json, category: 'issue_tracker').tap do |service|
JiraTrackerData.create!(service_id: service.id, url: 'http://other_jira_url')
......@@ -241,7 +241,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'jira service with empty properties' do
context 'Jira service with empty properties' do
let!(:service) do
services.create(id: 18, type: 'JiraService', properties: '', category: 'issue_tracker')
end
......@@ -253,7 +253,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'jira service with nil properties' do
context 'Jira service with nil properties' do
let!(:service) do
services.create(id: 18, type: 'JiraService', properties: nil, category: 'issue_tracker')
end
......@@ -265,7 +265,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'jira service with invalid properties' do
context 'Jira service with invalid properties' do
let!(:service) do
services.create(id: 18, type: 'JiraService', properties: 'invalid data', category: 'issue_tracker')
end
......@@ -277,7 +277,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context 'with jira service with invalid properties, valid jira service and valid bugzilla service' do
context 'with Jira service with invalid properties, valid Jira service and valid bugzilla service' do
let!(:jira_service_invalid) do
services.create(id: 19, title: 'invalid - title', description: 'invalid - description', type: 'JiraService', properties: 'invalid data', category: 'issue_tracker')
end
......
......@@ -118,7 +118,7 @@ describe 'Starting a Jira Import' do
it_behaves_like 'a mutation that returns errors in the response', errors: ['Unable to find Jira project to import data from.']
end
context 'when jira import successfully scheduled' do
context 'when Jira import successfully scheduled' do
it 'schedules a Jira import' do
post_graphql_mutation(mutation, current_user: current_user)
......
......@@ -2,7 +2,7 @@
require 'spec_helper'
describe 'query jira import data' do
describe 'query Jira import data' do
include GraphqlHelpers
let_it_be(:current_user) { create(:user) }
......
......@@ -73,14 +73,14 @@ describe JiraImport::StartImportService do
expect(subject).to be_success
end
it 'schedules jira import' do
it 'schedules Jira import' do
subject
expect(project.latest_jira_import).to be_scheduled
end
end
it 'creates jira import data' do
it 'creates Jira import data' do
jira_import = subject.payload[:import_data]
expect(jira_import.jira_project_xid).to eq(0)
......@@ -89,21 +89,21 @@ describe JiraImport::StartImportService do
expect(jira_import.user).to eq(user)
end
it 'creates jira import label' do
it 'creates Jira import label' do
expect { subject }.to change { Label.count }.by(1)
end
it 'creates jira label title with correct number' do
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
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
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"
......
# frozen_string_literal: true
shared_examples 'no jira import data present' do
shared_examples 'no Jira import data present' do
it 'returns none' do
expect(resolve_imports).to eq JiraImportState.none
end
end
shared_examples 'no jira import access' do
shared_examples 'no Jira import access' do
it 'raises error' do
expect do
resolve_imports
......
......@@ -20,7 +20,7 @@ shared_examples 'does not advance to next stage' do
end
end
shared_examples 'cannot do jira import' do
shared_examples 'cannot do Jira import' do
it 'does not advance to next stage' do
worker = described_class.new
expect(worker).not_to receive(:import)
......
......@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::FinishImportWorker do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
end
context 'when feature flag enabled' do
......@@ -27,7 +27,7 @@ describe Gitlab::JiraImport::Stage::FinishImportWorker do
end
context 'when import did not start' do
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
end
context 'when import started' do
......
......@@ -15,7 +15,7 @@ describe Gitlab::JiraImport::Stage::ImportAttachmentsWorker do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......@@ -27,7 +27,7 @@ describe Gitlab::JiraImport::Stage::ImportAttachmentsWorker do
end
context 'when import did not start' do
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......
......@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::ImportIssuesWorker do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......@@ -28,7 +28,7 @@ describe Gitlab::JiraImport::Stage::ImportIssuesWorker do
end
context 'when import did not start' do
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......
......@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::ImportLabelsWorker do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......@@ -28,7 +28,7 @@ describe Gitlab::JiraImport::Stage::ImportLabelsWorker do
end
context 'when import did not start' do
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......
......@@ -15,7 +15,7 @@ describe Gitlab::JiraImport::Stage::ImportNotesWorker do
stub_feature_flags(jira_issue_import: false)
end
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......@@ -27,7 +27,7 @@ describe Gitlab::JiraImport::Stage::ImportNotesWorker do
end
context 'when import did not start' do
it_behaves_like 'cannot do jira import'
it_behaves_like 'cannot do Jira import'
it_behaves_like 'does not advance to next stage'
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment