summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-05-23 19:37:59 -0400
committerRobert Speicher <rspeicher@gmail.com>2016-05-24 15:40:29 -0400
commit75739e54be0fca389c05d3d9d3de69737c0ff3ab (patch)
tree2d3f313a20e8cc57c6f62009f379a9e78d9ebd18 /spec/services
parent16ca3ee636a50c81674309bb95e067d3faf56bb6 (diff)
downloadgitlab-ce-75739e54be0fca389c05d3d9d3de69737c0ff3ab.tar.gz
Enable RSpec/NotToNot cop and auto-correct offensesrs-rubocop-nottonot
Also removes the note from the development/testing.md guide
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/auth/container_registry_authentication_service_spec.rb4
-rw-r--r--spec/services/create_commit_builds_service_spec.rb2
-rw-r--r--spec/services/groups/create_service_spec.rb2
-rw-r--r--spec/services/issues/create_service_spec.rb4
-rw-r--r--spec/services/issues/move_service_spec.rb6
-rw-r--r--spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb6
6 files changed, 12 insertions, 12 deletions
diff --git a/spec/services/auth/container_registry_authentication_service_spec.rb b/spec/services/auth/container_registry_authentication_service_spec.rb
index 3f4a1ced2b6..98ef9d21035 100644
--- a/spec/services/auth/container_registry_authentication_service_spec.rb
+++ b/spec/services/auth/container_registry_authentication_service_spec.rb
@@ -52,12 +52,12 @@ describe Auth::ContainerRegistryAuthenticationService, services: true do
shared_examples 'an unauthorized' do
it { is_expected.to include(http_status: 401) }
- it { is_expected.to_not include(:token) }
+ it { is_expected.not_to include(:token) }
end
shared_examples 'a forbidden' do
it { is_expected.to include(http_status: 403) }
- it { is_expected.to_not include(:token) }
+ it { is_expected.not_to include(:token) }
end
describe '#full_access_token' do
diff --git a/spec/services/create_commit_builds_service_spec.rb b/spec/services/create_commit_builds_service_spec.rb
index ea5dcfa068a..9ae8f31b372 100644
--- a/spec/services/create_commit_builds_service_spec.rb
+++ b/spec/services/create_commit_builds_service_spec.rb
@@ -78,7 +78,7 @@ describe CreateCommitBuildsService, services: true do
expect(commit).to be_persisted
expect(commit.builds.any?).to be false
expect(commit.status).to eq('failed')
- expect(commit.yaml_errors).to_not be_nil
+ expect(commit.yaml_errors).not_to be_nil
end
describe :ci_skip? do
diff --git a/spec/services/groups/create_service_spec.rb b/spec/services/groups/create_service_spec.rb
index 6aefb48a4e8..a97ac3ead45 100644
--- a/spec/services/groups/create_service_spec.rb
+++ b/spec/services/groups/create_service_spec.rb
@@ -14,7 +14,7 @@ describe Groups::CreateService, services: true do
context "cannot create group with restricted visibility level" do
before { allow(current_application_settings).to receive(:restricted_visibility_levels).and_return([Gitlab::VisibilityLevel::PUBLIC]) }
- it { is_expected.to_not be_persisted }
+ it { is_expected.not_to be_persisted }
end
end
end
diff --git a/spec/services/issues/create_service_spec.rb b/spec/services/issues/create_service_spec.rb
index 6aa0a89f893..1ee9f3aae4d 100644
--- a/spec/services/issues/create_service_spec.rb
+++ b/spec/services/issues/create_service_spec.rb
@@ -55,7 +55,7 @@ describe Issues::CreateService, services: true do
end
it 'does not assign label' do
- expect(issue.labels).to_not include label
+ expect(issue.labels).not_to include label
end
end
@@ -69,7 +69,7 @@ describe Issues::CreateService, services: true do
end
it 'does not assign milestone' do
- expect(issue.milestone).to_not eq milestone
+ expect(issue.milestone).not_to eq milestone
end
end
end
diff --git a/spec/services/issues/move_service_spec.rb b/spec/services/issues/move_service_spec.rb
index c15e26189a5..95fe6c2400a 100644
--- a/spec/services/issues/move_service_spec.rb
+++ b/spec/services/issues/move_service_spec.rb
@@ -194,10 +194,10 @@ describe Issues::MoveService, services: true do
include_context 'issue move executed'
it 'rewrites uploads in description' do
- expect(new_issue.description).to_not eq description
+ expect(new_issue.description).not_to eq description
expect(new_issue.description)
.to match(/Text and #{FileUploader::MARKDOWN_PATTERN}/)
- expect(new_issue.description).to_not include uploader.secret
+ expect(new_issue.description).not_to include uploader.secret
end
end
end
@@ -231,7 +231,7 @@ describe Issues::MoveService, services: true do
context 'user is reporter in both projects' do
include_context 'user can move issue'
- it { expect { move }.to_not raise_error }
+ it { expect { move }.not_to raise_error }
end
context 'user is reporter only in new project' do
diff --git a/spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb b/spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb
index 52a302e0e1a..82247849814 100644
--- a/spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb
+++ b/spec/services/merge_requests/merge_when_build_succeeds_service_spec.rb
@@ -75,7 +75,7 @@ describe MergeRequests::MergeWhenBuildSucceedsService do
allow(ci_commit).to receive(:success?).and_return(true)
allow(old_build).to receive(:sha).and_return('1234abcdef')
- expect(MergeWorker).to_not receive(:perform_async)
+ expect(MergeWorker).not_to receive(:perform_async)
service.trigger(old_build)
end
end
@@ -88,7 +88,7 @@ describe MergeRequests::MergeWhenBuildSucceedsService do
it "doesn't merge a requests for status on other branch" do
allow(project.repository).to receive(:branch_names_contains).with(commit_status.sha).and_return([])
- expect(MergeWorker).to_not receive(:perform_async)
+ expect(MergeWorker).not_to receive(:perform_async)
service.trigger(commit_status)
end
@@ -122,7 +122,7 @@ describe MergeRequests::MergeWhenBuildSucceedsService do
end
it "doesn't merge if some stages failed" do
- expect(MergeWorker).to_not receive(:perform_async)
+ expect(MergeWorker).not_to receive(:perform_async)
build.success
test.drop
end