Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e1e823c2
Commit
e1e823c2
authored
Apr 20, 2020
by
charlieablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Jira capitalisation consistent
- Change from `jira` to `Jira` in specs
parent
45183ce3
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
36 additions
and
36 deletions
+36
-36
spec/controllers/projects/import/jira_controller_spec.rb
spec/controllers/projects/import/jira_controller_spec.rb
+5
-5
spec/graphql/resolvers/projects/jira_imports_resolver_spec.rb
.../graphql/resolvers/projects/jira_imports_resolver_spec.rb
+4
-4
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
...d_migration/migrate_issue_trackers_sensitive_data_spec.rb
+6
-6
spec/requests/api/graphql/mutations/jira_import/start_spec.rb
.../requests/api/graphql/mutations/jira_import/start_spec.rb
+1
-1
spec/requests/api/graphql/project/jira_import_spec.rb
spec/requests/api/graphql/project/jira_import_spec.rb
+1
-1
spec/services/jira_import/start_import_service_spec.rb
spec/services/jira_import/start_import_service_spec.rb
+6
-6
spec/support/shared_examples/graphql/jira_import/jira_import_resolver_shared_examples.rb
...aphql/jira_import/jira_import_resolver_shared_examples.rb
+2
-2
spec/support/shared_examples/workers/gitlab/jira_import/jira_import_workers_shared_examples.rb
...gitlab/jira_import/jira_import_workers_shared_examples.rb
+1
-1
spec/workers/gitlab/jira_import/stage/finish_import_worker_spec.rb
...ers/gitlab/jira_import/stage/finish_import_worker_spec.rb
+2
-2
spec/workers/gitlab/jira_import/stage/import_attachments_worker_spec.rb
...itlab/jira_import/stage/import_attachments_worker_spec.rb
+2
-2
spec/workers/gitlab/jira_import/stage/import_issues_worker_spec.rb
...ers/gitlab/jira_import/stage/import_issues_worker_spec.rb
+2
-2
spec/workers/gitlab/jira_import/stage/import_labels_worker_spec.rb
...ers/gitlab/jira_import/stage/import_labels_worker_spec.rb
+2
-2
spec/workers/gitlab/jira_import/stage/import_notes_worker_spec.rb
...kers/gitlab/jira_import/stage/import_notes_worker_spec.rb
+2
-2
No files found.
spec/controllers/projects/import/jira_controller_spec.rb
View file @
e1e823c2
...
...
@@ -63,7 +63,7 @@ describe Projects::Import::JiraController do
stub_feature_flags
(
jira_issue_import_vue:
false
)
end
context
'when
j
ira service is enabled for the project'
do
context
'when
J
ira 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
j
ira service'
do
it
'does not query
J
ira service'
do
expect
(
project
).
not_to
receive
(
:jira_service
)
end
...
...
@@ -118,7 +118,7 @@ describe Projects::Import::JiraController do
end
end
context
'when running
j
ira import first time'
do
context
'when running
J
ira 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
j
ira project key is empty'
do
context
'when
J
ira 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
j
ira import ran before'
do
context
'when
J
ira 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
...
...
spec/graphql/resolvers/projects/jira_imports_resolver_spec.rb
View file @
e1e823c2
...
...
@@ -16,7 +16,7 @@ describe Resolvers::Projects::JiraImportsResolver do
context
'when anonymous user'
do
let
(
:current_user
)
{
nil
}
it_behaves_like
'no
j
ira import access'
it_behaves_like
'no
J
ira import access'
end
end
...
...
@@ -25,7 +25,7 @@ describe Resolvers::Projects::JiraImportsResolver do
project
.
add_guest
(
user
)
end
it_behaves_like
'no
j
ira import data present'
it_behaves_like
'no
J
ira 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
j
ira import access'
it_behaves_like
'no
J
ira import access'
end
context
'when user cannot read Jira imports'
do
context
'when anonymous user'
do
let
(
:current_user
)
{
nil
}
it_behaves_like
'no
j
ira import access'
it_behaves_like
'no
J
ira import access'
end
end
...
...
spec/lib/gitlab/background_migration/migrate_issue_trackers_sensitive_data_spec.rb
View file @
e1e823c2
...
...
@@ -90,7 +90,7 @@ describe Gitlab::BackgroundMigration::MigrateIssueTrackersSensitiveData, schema:
end
end
context
'with
j
ira service'
do
context
'with
J
ira 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
j
ira service which has data fields record inconsistent with properties field'
do
context
'with
J
ira 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
'
j
ira service with empty properties'
do
context
'
J
ira 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
'
j
ira service with nil properties'
do
context
'
J
ira 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
'
j
ira service with invalid properties'
do
context
'
J
ira 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 j
ira service and valid bugzilla service'
do
context
'with
Jira service with invalid properties, valid J
ira 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
...
...
spec/requests/api/graphql/mutations/jira_import/start_spec.rb
View file @
e1e823c2
...
...
@@ -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
j
ira import successfully scheduled'
do
context
'when
J
ira import successfully scheduled'
do
it
'schedules a Jira import'
do
post_graphql_mutation
(
mutation
,
current_user:
current_user
)
...
...
spec/requests/api/graphql/project/jira_import_spec.rb
View file @
e1e823c2
...
...
@@ -2,7 +2,7 @@
require
'spec_helper'
describe
'query
j
ira import data'
do
describe
'query
J
ira import data'
do
include
GraphqlHelpers
let_it_be
(
:current_user
)
{
create
(
:user
)
}
...
...
spec/services/jira_import/start_import_service_spec.rb
View file @
e1e823c2
...
...
@@ -73,14 +73,14 @@ describe JiraImport::StartImportService do
expect
(
subject
).
to
be_success
end
it
'schedules
j
ira import'
do
it
'schedules
J
ira import'
do
subject
expect
(
project
.
latest_jira_import
).
to
be_scheduled
end
end
it
'creates
j
ira import data'
do
it
'creates
J
ira 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
j
ira import label'
do
it
'creates
J
ira import label'
do
expect
{
subject
}.
to
change
{
Label
.
count
}.
by
(
1
)
end
it
'creates
j
ira label title with correct number'
do
it
'creates
J
ira 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 j
ira project'
do
context
'when multiple
Jira imports for same J
ira project'
do
let!
(
:jira_imports
)
{
create_list
(
:jira_import_state
,
3
,
:finished
,
project:
project
,
jira_project_key:
fake_key
)}
it
'creates
j
ira label title with correct number'
do
it
'creates
J
ira label title with correct number'
do
jira_import
=
subject
.
payload
[
:import_data
]
label_title
=
"jira-import::
#{
jira_import
.
jira_project_key
}
-4"
...
...
spec/support/shared_examples/graphql/jira_import/jira_import_resolver_shared_examples.rb
View file @
e1e823c2
# frozen_string_literal: true
shared_examples
'no
j
ira import data present'
do
shared_examples
'no
J
ira import data present'
do
it
'returns none'
do
expect
(
resolve_imports
).
to
eq
JiraImportState
.
none
end
end
shared_examples
'no
j
ira import access'
do
shared_examples
'no
J
ira import access'
do
it
'raises error'
do
expect
do
resolve_imports
...
...
spec/support/shared_examples/workers/gitlab/jira_import/jira_import_workers_shared_examples.rb
View file @
e1e823c2
...
...
@@ -20,7 +20,7 @@ shared_examples 'does not advance to next stage' do
end
end
shared_examples
'cannot do
j
ira import'
do
shared_examples
'cannot do
J
ira import'
do
it
'does not advance to next stage'
do
worker
=
described_class
.
new
expect
(
worker
).
not_to
receive
(
:import
)
...
...
spec/workers/gitlab/jira_import/stage/finish_import_worker_spec.rb
View file @
e1e823c2
...
...
@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::FinishImportWorker do
stub_feature_flags
(
jira_issue_import:
false
)
end
it_behaves_like
'cannot do
j
ira import'
it_behaves_like
'cannot do
J
ira 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
j
ira import'
it_behaves_like
'cannot do
J
ira import'
end
context
'when import started'
do
...
...
spec/workers/gitlab/jira_import/stage/import_attachments_worker_spec.rb
View file @
e1e823c2
...
...
@@ -15,7 +15,7 @@ describe Gitlab::JiraImport::Stage::ImportAttachmentsWorker do
stub_feature_flags
(
jira_issue_import:
false
)
end
it_behaves_like
'cannot do
j
ira import'
it_behaves_like
'cannot do
J
ira 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
j
ira import'
it_behaves_like
'cannot do
J
ira import'
it_behaves_like
'does not advance to next stage'
end
...
...
spec/workers/gitlab/jira_import/stage/import_issues_worker_spec.rb
View file @
e1e823c2
...
...
@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::ImportIssuesWorker do
stub_feature_flags
(
jira_issue_import:
false
)
end
it_behaves_like
'cannot do
j
ira import'
it_behaves_like
'cannot do
J
ira 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
j
ira import'
it_behaves_like
'cannot do
J
ira import'
it_behaves_like
'does not advance to next stage'
end
...
...
spec/workers/gitlab/jira_import/stage/import_labels_worker_spec.rb
View file @
e1e823c2
...
...
@@ -16,7 +16,7 @@ describe Gitlab::JiraImport::Stage::ImportLabelsWorker do
stub_feature_flags
(
jira_issue_import:
false
)
end
it_behaves_like
'cannot do
j
ira import'
it_behaves_like
'cannot do
J
ira 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
j
ira import'
it_behaves_like
'cannot do
J
ira import'
it_behaves_like
'does not advance to next stage'
end
...
...
spec/workers/gitlab/jira_import/stage/import_notes_worker_spec.rb
View file @
e1e823c2
...
...
@@ -15,7 +15,7 @@ describe Gitlab::JiraImport::Stage::ImportNotesWorker do
stub_feature_flags
(
jira_issue_import:
false
)
end
it_behaves_like
'cannot do
j
ira import'
it_behaves_like
'cannot do
J
ira 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
j
ira import'
it_behaves_like
'cannot do
J
ira import'
it_behaves_like
'does not advance to next stage'
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment