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:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-08-01 18:00:44 +0300
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-08-09 17:11:39 +0300
commit1d268a89deef10854193db48d65cf5d519a0363d (patch)
tree59765b4a2f83b453875fa7aefe9b7ab5c65e3c67 /spec/services
parent519275c1102ad8a1d56f5807de2d8a1ae4b21dc0 (diff)
adds second batch of tests changed to active tense
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/create_snippet_service_spec.rb4
-rw-r--r--spec/services/event_create_service_spec.rb14
-rw-r--r--spec/services/git_hooks_service_spec.rb6
-rw-r--r--spec/services/git_push_service_spec.rb6
-rw-r--r--spec/services/issues/bulk_update_service_spec.rb2
-rw-r--r--spec/services/issues/close_service_spec.rb4
-rw-r--r--spec/services/issues/update_service_spec.rb8
-rw-r--r--spec/services/merge_requests/close_service_spec.rb4
-rw-r--r--spec/services/merge_requests/create_service_spec.rb2
-rw-r--r--spec/services/merge_requests/merge_service_spec.rb4
-rw-r--r--spec/services/merge_requests/refresh_service_spec.rb4
-rw-r--r--spec/services/merge_requests/reopen_service_spec.rb6
-rw-r--r--spec/services/merge_requests/update_service_spec.rb8
-rw-r--r--spec/services/notification_service_spec.rb8
-rw-r--r--spec/services/projects/autocomplete_service_spec.rb14
-rw-r--r--spec/services/projects/create_service_spec.rb6
-rw-r--r--spec/services/projects/fork_service_spec.rb8
-rw-r--r--spec/services/projects/update_service_spec.rb18
-rw-r--r--spec/services/repair_ldap_blocked_user_service_spec.rb4
-rw-r--r--spec/services/search_service_spec.rb8
-rw-r--r--spec/services/system_note_service_spec.rb12
-rw-r--r--spec/services/test_hook_service_spec.rb2
22 files changed, 76 insertions, 76 deletions
diff --git a/spec/services/create_snippet_service_spec.rb b/spec/services/create_snippet_service_spec.rb
index 7a850066bf8..d81d0fd76c9 100644
--- a/spec/services/create_snippet_service_spec.rb
+++ b/spec/services/create_snippet_service_spec.rb
@@ -19,7 +19,7 @@ describe CreateSnippetService, services: true do
@opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
end
- it 'non-admins should not be able to create a public snippet' do
+ it 'non-admins are not able to create a public snippet' do
snippet = create_snippet(nil, @user, @opts)
expect(snippet.errors.messages).to have_key(:visibility_level)
expect(snippet.errors.messages[:visibility_level].first).to(
@@ -27,7 +27,7 @@ describe CreateSnippetService, services: true do
)
end
- it 'admins should be able to create a public snippet' do
+ it 'admins are able to create a public snippet' do
snippet = create_snippet(nil, @admin, @opts)
expect(snippet.errors.any?).to be_falsey
expect(snippet.visibility_level).to eq(Gitlab::VisibilityLevel::PUBLIC)
diff --git a/spec/services/event_create_service_spec.rb b/spec/services/event_create_service_spec.rb
index 789836f71bb..16a9956fe7f 100644
--- a/spec/services/event_create_service_spec.rb
+++ b/spec/services/event_create_service_spec.rb
@@ -41,7 +41,7 @@ describe EventCreateService, services: true do
it { expect(service.open_mr(merge_request, merge_request.author)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.open_mr(merge_request, merge_request.author) }.to change { Event.count }
end
end
@@ -51,7 +51,7 @@ describe EventCreateService, services: true do
it { expect(service.close_mr(merge_request, merge_request.author)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.close_mr(merge_request, merge_request.author) }.to change { Event.count }
end
end
@@ -61,7 +61,7 @@ describe EventCreateService, services: true do
it { expect(service.merge_mr(merge_request, merge_request.author)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.merge_mr(merge_request, merge_request.author) }.to change { Event.count }
end
end
@@ -71,7 +71,7 @@ describe EventCreateService, services: true do
it { expect(service.reopen_mr(merge_request, merge_request.author)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.reopen_mr(merge_request, merge_request.author) }.to change { Event.count }
end
end
@@ -85,7 +85,7 @@ describe EventCreateService, services: true do
it { expect(service.open_milestone(milestone, user)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.open_milestone(milestone, user) }.to change { Event.count }
end
end
@@ -95,7 +95,7 @@ describe EventCreateService, services: true do
it { expect(service.close_milestone(milestone, user)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.close_milestone(milestone, user) }.to change { Event.count }
end
end
@@ -105,7 +105,7 @@ describe EventCreateService, services: true do
it { expect(service.destroy_milestone(milestone, user)).to be_truthy }
- it "should create new event" do
+ it "creates new event" do
expect { service.destroy_milestone(milestone, user) }.to change { Event.count }
end
end
diff --git a/spec/services/git_hooks_service_spec.rb b/spec/services/git_hooks_service_spec.rb
index 3fc37a315c0..41b0968b8b4 100644
--- a/spec/services/git_hooks_service_spec.rb
+++ b/spec/services/git_hooks_service_spec.rb
@@ -17,7 +17,7 @@ describe GitHooksService, services: true do
describe '#execute' do
context 'when receive hooks were successful' do
- it 'should call post-receive hook' do
+ it 'calls post-receive hook' do
hook = double(trigger: [true, nil])
expect(Gitlab::Git::Hook).to receive(:new).exactly(3).times.and_return(hook)
@@ -26,7 +26,7 @@ describe GitHooksService, services: true do
end
context 'when pre-receive hook failed' do
- it 'should not call post-receive hook' do
+ it 'does not call post-receive hook' do
expect(service).to receive(:run_hook).with('pre-receive').and_return([false, ''])
expect(service).not_to receive(:run_hook).with('post-receive')
@@ -37,7 +37,7 @@ describe GitHooksService, services: true do
end
context 'when update hook failed' do
- it 'should not call post-receive hook' do
+ it 'does not call post-receive hook' do
expect(service).to receive(:run_hook).with('pre-receive').and_return([true, nil])
expect(service).to receive(:run_hook).with('update').and_return([false, ''])
expect(service).not_to receive(:run_hook).with('post-receive')
diff --git a/spec/services/git_push_service_spec.rb b/spec/services/git_push_service_spec.rb
index ffa998dffc3..80f6ebac86c 100644
--- a/spec/services/git_push_service_spec.rb
+++ b/spec/services/git_push_service_spec.rb
@@ -420,7 +420,7 @@ describe GitPushService, services: true do
context "mentioning an issue" do
let(:message) { "this is some work.\n\nrelated to JIRA-1" }
- it "should initiate one api call to jira server to mention the issue" do
+ it "initiates one api call to jira server to mention the issue" do
execute_service(project, user, @oldrev, @newrev, @ref )
expect(WebMock).to have_requested(:post, jira_api_comment_url).with(
@@ -432,7 +432,7 @@ describe GitPushService, services: true do
context "closing an issue" do
let(:message) { "this is some work.\n\ncloses JIRA-1" }
- it "should initiate one api call to jira server to close the issue" do
+ it "initiates one api call to jira server to close the issue" do
transition_body = {
transition: {
id: '2'
@@ -445,7 +445,7 @@ describe GitPushService, services: true do
).once
end
- it "should initiate one api call to jira server to comment on the issue" do
+ it "initiates one api call to jira server to comment on the issue" do
comment_body = {
body: "Issue solved with [#{closing_commit.id}|http://localhost/#{project.path_with_namespace}/commit/#{closing_commit.id}]."
}.to_json
diff --git a/spec/services/issues/bulk_update_service_spec.rb b/spec/services/issues/bulk_update_service_spec.rb
index 321b54ac39d..ac08aa53b0b 100644
--- a/spec/services/issues/bulk_update_service_spec.rb
+++ b/spec/services/issues/bulk_update_service_spec.rb
@@ -217,7 +217,7 @@ describe Issues::BulkUpdateService, services: true do
let(:labels) { [merge_requests] }
let(:remove_labels) { [regression] }
- it 'remove the label IDs from all issues passed' do
+ it 'removes the label IDs from all issues passed' do
expect(issues.map(&:reload).map(&:label_ids).flatten).not_to include(regression.id)
end
diff --git a/spec/services/issues/close_service_spec.rb b/spec/services/issues/close_service_spec.rb
index 67a919ba8ee..1318607a388 100644
--- a/spec/services/issues/close_service_spec.rb
+++ b/spec/services/issues/close_service_spec.rb
@@ -23,13 +23,13 @@ describe Issues::CloseService, services: true do
it { expect(@issue).to be_valid }
it { expect(@issue).to be_closed }
- it 'should send email to user2 about assign of new issue' do
+ it 'sends email to user2 about assign of new issue' do
email = ActionMailer::Base.deliveries.last
expect(email.to.first).to eq(user2.email)
expect(email.subject).to include(issue.title)
end
- it 'should create system note about issue reassign' do
+ it 'creates system note about issue reassign' do
note = @issue.notes.last
expect(note.note).to include "Status changed to closed"
end
diff --git a/spec/services/issues/update_service_spec.rb b/spec/services/issues/update_service_spec.rb
index dacbcd8fb46..088c3d48bf7 100644
--- a/spec/services/issues/update_service_spec.rb
+++ b/spec/services/issues/update_service_spec.rb
@@ -53,7 +53,7 @@ describe Issues::UpdateService, services: true do
it { expect(@issue.labels.count).to eq(1) }
it { expect(@issue.labels.first.title).to eq(label.name) }
- it 'should send email to user2 about assign of new issue and email to user3 about issue unassignment' do
+ it 'sends email to user2 about assign of new issue and email to user3 about issue unassignment' do
deliveries = ActionMailer::Base.deliveries
email = deliveries.last
recipients = deliveries.last(2).map(&:to).flatten
@@ -61,14 +61,14 @@ describe Issues::UpdateService, services: true do
expect(email.subject).to include(issue.title)
end
- it 'should create system note about issue reassign' do
+ it 'creates system note about issue reassign' do
note = find_note('Reassigned to')
expect(note).not_to be_nil
expect(note.note).to include "Reassigned to \@#{user2.username}"
end
- it 'should create system note about issue label edit' do
+ it 'creates system note about issue label edit' do
note = find_note('Added ~')
expect(note).not_to be_nil
@@ -267,7 +267,7 @@ describe Issues::UpdateService, services: true do
expect(note).to be_nil
end
- it 'should not generate a new note at all' do
+ it 'does not generate a new note at all' do
expect do
update_issue({ description: "- [ ] One\n- [ ] Two\n- [ ] Three" })
end.not_to change { Note.count }
diff --git a/spec/services/merge_requests/close_service_spec.rb b/spec/services/merge_requests/close_service_spec.rb
index c1db4f3284b..403533be5d9 100644
--- a/spec/services/merge_requests/close_service_spec.rb
+++ b/spec/services/merge_requests/close_service_spec.rb
@@ -32,13 +32,13 @@ describe MergeRequests::CloseService, services: true do
with(@merge_request, 'close')
end
- it 'should send email to user2 about assign of new merge_request' do
+ it 'sends email to user2 about assign of new merge_request' do
email = ActionMailer::Base.deliveries.last
expect(email.to.first).to eq(user2.email)
expect(email.subject).to include(merge_request.title)
end
- it 'should create system note about merge_request reassign' do
+ it 'creates system note about merge_request reassign' do
note = @merge_request.notes.last
expect(note.note).to include 'Status changed to closed'
end
diff --git a/spec/services/merge_requests/create_service_spec.rb b/spec/services/merge_requests/create_service_spec.rb
index d0b55d2d509..b84a580967a 100644
--- a/spec/services/merge_requests/create_service_spec.rb
+++ b/spec/services/merge_requests/create_service_spec.rb
@@ -32,7 +32,7 @@ describe MergeRequests::CreateService, services: true do
it { expect(@merge_request.assignee).to be_nil }
it { expect(@merge_request.merge_params['force_remove_source_branch']).to eq('1') }
- it 'should execute hooks with default action' do
+ it 'executes hooks with default action' do
expect(service).to have_received(:execute_hooks).with(@merge_request)
end
diff --git a/spec/services/merge_requests/merge_service_spec.rb b/spec/services/merge_requests/merge_service_spec.rb
index 8ffebcac698..159f6817e8d 100644
--- a/spec/services/merge_requests/merge_service_spec.rb
+++ b/spec/services/merge_requests/merge_service_spec.rb
@@ -26,13 +26,13 @@ describe MergeRequests::MergeService, services: true do
it { expect(merge_request).to be_valid }
it { expect(merge_request).to be_merged }
- it 'should send email to user2 about merge of new merge_request' do
+ it 'sends email to user2 about merge of new merge_request' do
email = ActionMailer::Base.deliveries.last
expect(email.to.first).to eq(user2.email)
expect(email.subject).to include(merge_request.title)
end
- it 'should create system note about merge_request merge' do
+ it 'creates system note about merge_request merge' do
note = merge_request.notes.last
expect(note.note).to include 'Status changed to merged'
end
diff --git a/spec/services/merge_requests/refresh_service_spec.rb b/spec/services/merge_requests/refresh_service_spec.rb
index 781ee7ffed3..fff86480c6d 100644
--- a/spec/services/merge_requests/refresh_service_spec.rb
+++ b/spec/services/merge_requests/refresh_service_spec.rb
@@ -55,7 +55,7 @@ describe MergeRequests::RefreshService, services: true do
reload_mrs
end
- it 'should execute hooks with update action' do
+ it 'executes hooks with update action' do
expect(refresh_service).to have_received(:execute_hooks).
with(@merge_request, 'update', @oldrev)
end
@@ -111,7 +111,7 @@ describe MergeRequests::RefreshService, services: true do
reload_mrs
end
- it 'should execute hooks with update action' do
+ it 'executes hooks with update action' do
expect(refresh_service).to have_received(:execute_hooks).
with(@fork_merge_request, 'update', @oldrev)
end
diff --git a/spec/services/merge_requests/reopen_service_spec.rb b/spec/services/merge_requests/reopen_service_spec.rb
index 88c9c640514..3419b8bf5e6 100644
--- a/spec/services/merge_requests/reopen_service_spec.rb
+++ b/spec/services/merge_requests/reopen_service_spec.rb
@@ -27,18 +27,18 @@ describe MergeRequests::ReopenService, services: true do
it { expect(merge_request).to be_valid }
it { expect(merge_request).to be_reopened }
- it 'should execute hooks with reopen action' do
+ it 'executes hooks with reopen action' do
expect(service).to have_received(:execute_hooks).
with(merge_request, 'reopen')
end
- it 'should send email to user2 about reopen of merge_request' do
+ it 'sends email to user2 about reopen of merge_request' do
email = ActionMailer::Base.deliveries.last
expect(email.to.first).to eq(user2.email)
expect(email.subject).to include(merge_request.title)
end
- it 'should create system note about merge_request reopen' do
+ it 'creates system note about merge_request reopen' do
note = merge_request.notes.last
expect(note.note).to include 'Status changed to reopened'
end
diff --git a/spec/services/merge_requests/update_service_spec.rb b/spec/services/merge_requests/update_service_spec.rb
index d4ebe28c276..283a336afd9 100644
--- a/spec/services/merge_requests/update_service_spec.rb
+++ b/spec/services/merge_requests/update_service_spec.rb
@@ -64,12 +64,12 @@ describe MergeRequests::UpdateService, services: true do
it { expect(@merge_request.target_branch).to eq('target') }
it { expect(@merge_request.merge_params['force_remove_source_branch']).to eq('1') }
- it 'should execute hooks with update action' do
+ it 'executes hooks with update action' do
expect(service).to have_received(:execute_hooks).
with(@merge_request, 'update')
end
- it 'should send email to user2 about assign of new merge request and email to user3 about merge request unassignment' do
+ it 'sends email to user2 about assign of new merge request and email to user3 about merge request unassignment' do
deliveries = ActionMailer::Base.deliveries
email = deliveries.last
recipients = deliveries.last(2).map(&:to).flatten
@@ -77,14 +77,14 @@ describe MergeRequests::UpdateService, services: true do
expect(email.subject).to include(merge_request.title)
end
- it 'should create system note about merge_request reassign' do
+ it 'creates system note about merge_request reassign' do
note = find_note('Reassigned to')
expect(note).not_to be_nil
expect(note.note).to include "Reassigned to \@#{user2.username}"
end
- it 'should create system note about merge_request label edit' do
+ it 'creates system note about merge_request label edit' do
note = find_note('Added ~')
expect(note).not_to be_nil
diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb
index 9fc93f325f7..92b441c28ca 100644
--- a/spec/services/notification_service_spec.rb
+++ b/spec/services/notification_service_spec.rb
@@ -15,7 +15,7 @@ describe NotificationService, services: true do
it { expect(notification.new_key(key)).to be_truthy }
- it 'should sent email to key owner' do
+ it 'sends email to key owner' do
expect{ notification.new_key(key) }.to change{ ActionMailer::Base.deliveries.size }.by(1)
end
end
@@ -27,7 +27,7 @@ describe NotificationService, services: true do
it { expect(notification.new_email(email)).to be_truthy }
- it 'should send email to email owner' do
+ it 'sends email to email owner' do
expect{ notification.new_email(email) }.to change{ ActionMailer::Base.deliveries.size }.by(1)
end
end
@@ -593,7 +593,7 @@ describe NotificationService, services: true do
update_custom_notification(:close_issue, @u_custom_global)
end
- it 'should sent email to issue assignee and issue author' do
+ it 'sends email to issue assignee and issue author' do
notification.close_issue(issue, @u_disabled)
should_email(issue.assignee)
@@ -646,7 +646,7 @@ describe NotificationService, services: true do
update_custom_notification(:reopen_issue, @u_custom_global)
end
- it 'should send email to issue assignee and issue author' do
+ it 'sends email to issue assignee and issue author' do
notification.reopen_issue(issue, @u_disabled)
should_email(issue.assignee)
diff --git a/spec/services/projects/autocomplete_service_spec.rb b/spec/services/projects/autocomplete_service_spec.rb
index 0971fec2e9f..7916c2d957c 100644
--- a/spec/services/projects/autocomplete_service_spec.rb
+++ b/spec/services/projects/autocomplete_service_spec.rb
@@ -13,7 +13,7 @@ describe Projects::AutocompleteService, services: true do
let!(:security_issue_1) { create(:issue, :confidential, project: project, title: 'Security issue 1', author: author) }
let!(:security_issue_2) { create(:issue, :confidential, title: 'Security issue 2', project: project, assignee: assignee) }
- it 'should not list project confidential issues for guests' do
+ it 'does not list project confidential issues for guests' do
autocomplete = described_class.new(project, nil)
issues = autocomplete.issues.map(&:iid)
@@ -23,7 +23,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 1
end
- it 'should not list project confidential issues for non project members' do
+ it 'does not list project confidential issues for non project members' do
autocomplete = described_class.new(project, non_member)
issues = autocomplete.issues.map(&:iid)
@@ -33,7 +33,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 1
end
- it 'should not list project confidential issues for project members with guest role' do
+ it 'does not list project confidential issues for project members with guest role' do
project.team << [member, :guest]
autocomplete = described_class.new(project, non_member)
@@ -45,7 +45,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 1
end
- it 'should list project confidential issues for author' do
+ it 'lists project confidential issues for author' do
autocomplete = described_class.new(project, author)
issues = autocomplete.issues.map(&:iid)
@@ -55,7 +55,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 2
end
- it 'should list project confidential issues for assignee' do
+ it 'lists project confidential issues for assignee' do
autocomplete = described_class.new(project, assignee)
issues = autocomplete.issues.map(&:iid)
@@ -65,7 +65,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 2
end
- it 'should list project confidential issues for project members' do
+ it 'lists project confidential issues for project members' do
project.team << [member, :developer]
autocomplete = described_class.new(project, member)
@@ -77,7 +77,7 @@ describe Projects::AutocompleteService, services: true do
expect(issues.count).to eq 3
end
- it 'should list all project issues for admin' do
+ it 'lists all project issues for admin' do
autocomplete = described_class.new(project, admin)
issues = autocomplete.issues.map(&:iid)
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb
index fd114359467..bbced59ff02 100644
--- a/spec/services/projects/create_service_spec.rb
+++ b/spec/services/projects/create_service_spec.rb
@@ -109,7 +109,7 @@ describe Projects::CreateService, services: true do
)
end
- it 'should not allow a restricted visibility level for non-admins' do
+ it 'does not allow a restricted visibility level for non-admins' do
project = create_project(@user, @opts)
expect(project).to respond_to(:errors)
expect(project.errors.messages).to have_key(:visibility_level)
@@ -118,7 +118,7 @@ describe Projects::CreateService, services: true do
)
end
- it 'should allow a restricted visibility level for admins' do
+ it 'allows a restricted visibility level for admins' do
admin = create(:admin)
project = create_project(admin, @opts)
@@ -128,7 +128,7 @@ describe Projects::CreateService, services: true do
end
context 'repository creation' do
- it 'should synchronously create the repository' do
+ it 'synchronously creates the repository' do
expect_any_instance_of(Project).to receive(:create_repository)
project = create_project(@user, @opts)
diff --git a/spec/services/projects/fork_service_spec.rb b/spec/services/projects/fork_service_spec.rb
index 31bb7120d84..ef2036c78b1 100644
--- a/spec/services/projects/fork_service_spec.rb
+++ b/spec/services/projects/fork_service_spec.rb
@@ -26,7 +26,7 @@ describe Projects::ForkService, services: true do
end
context 'project already exists' do
- it "should fail due to validation, not transaction failure" do
+ it "fails due to validation, not transaction failure" do
@existing_project = create(:project, creator_id: @to_user.id, name: @from_project.name, namespace: @to_namespace)
@to_project = fork_project(@from_project, @to_user)
expect(@existing_project.persisted?).to be_truthy
@@ -36,7 +36,7 @@ describe Projects::ForkService, services: true do
end
context 'GitLab CI is enabled' do
- it "fork and enable CI for fork" do
+ it "forks and enables CI for fork" do
@from_project.enable_ci
@to_project = fork_project(@from_project, @to_user)
expect(@to_project.builds_enabled?).to be_truthy
@@ -97,14 +97,14 @@ describe Projects::ForkService, services: true do
end
context 'fork project for group when user not owner' do
- it 'group developer should fail to fork project into the group' do
+ it 'group developer fails to fork project into the group' do
to_project = fork_project(@project, @developer, @opts)
expect(to_project.errors[:namespace]).to eq(['is not valid'])
end
end
context 'project already exists in group' do
- it 'should fail due to validation, not transaction failure' do
+ it 'fails due to validation, not transaction failure' do
existing_project = create(:project, name: @project.name,
namespace: @group)
to_project = fork_project(@project, @group_owner, @opts)
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb
index e8b9e6b9238..e139be19140 100644
--- a/spec/services/projects/update_service_spec.rb
+++ b/spec/services/projects/update_service_spec.rb
@@ -9,7 +9,7 @@ describe Projects::UpdateService, services: true do
@opts = {}
end
- context 'should be private when updated to private' do
+ context 'is private when updated to private' do
before do
@created_private = @project.private?
@@ -21,7 +21,7 @@ describe Projects::UpdateService, services: true do
it { expect(@project.private?).to be_truthy }
end
- context 'should be internal when updated to internal' do
+ context 'is internal when updated to internal' do
before do
@created_private = @project.private?
@@ -33,7 +33,7 @@ describe Projects::UpdateService, services: true do
it { expect(@project.internal?).to be_truthy }
end
- context 'should be public when updated to public' do
+ context 'is public when updated to public' do
before do
@created_private = @project.private?
@@ -50,7 +50,7 @@ describe Projects::UpdateService, services: true do
stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC])
end
- context 'should be private when updated to private' do
+ context 'is private when updated to private' do
before do
@created_private = @project.private?
@@ -62,7 +62,7 @@ describe Projects::UpdateService, services: true do
it { expect(@project.private?).to be_truthy }
end
- context 'should be internal when updated to internal' do
+ context 'is internal when updated to internal' do
before do
@created_private = @project.private?
@@ -74,7 +74,7 @@ describe Projects::UpdateService, services: true do
it { expect(@project.internal?).to be_truthy }
end
- context 'should be private when updated to public' do
+ context 'is private when updated to public' do
before do
@created_private = @project.private?
@@ -86,7 +86,7 @@ describe Projects::UpdateService, services: true do
it { expect(@project.private?).to be_truthy }
end
- context 'should be public when updated to public by admin' do
+ context 'is public when updated to public by admin' do
before do
@created_private = @project.private?
@@ -114,7 +114,7 @@ describe Projects::UpdateService, services: true do
@fork_created_internal = forked_project.internal?
end
- context 'should update forks visibility level when parent set to more restrictive' do
+ context 'updates forks visibility level when parent set to more restrictive' do
before do
opts.merge!(visibility_level: Gitlab::VisibilityLevel::PRIVATE)
update_project(project, user, opts).inspect
@@ -126,7 +126,7 @@ describe Projects::UpdateService, services: true do
it { expect(project.forks.first.private?).to be_truthy }
end
- context 'should not update forks visibility level when parent set to less restrictive' do
+ context 'does not update forks visibility level when parent set to less restrictive' do
before do
opts.merge!(visibility_level: Gitlab::VisibilityLevel::PUBLIC)
update_project(project, user, opts).inspect
diff --git a/spec/services/repair_ldap_blocked_user_service_spec.rb b/spec/services/repair_ldap_blocked_user_service_spec.rb
index ce7d1455975..87192457298 100644
--- a/spec/services/repair_ldap_blocked_user_service_spec.rb
+++ b/spec/services/repair_ldap_blocked_user_service_spec.rb
@@ -6,14 +6,14 @@ describe RepairLdapBlockedUserService, services: true do
subject(:service) { RepairLdapBlockedUserService.new(user) }
describe '#execute' do
- it 'change to normal block after destroying last ldap identity' do
+ it 'changes to normal block after destroying last ldap identity' do
identity.destroy
service.execute
expect(user.reload).not_to be_ldap_blocked
end
- it 'change to normal block after changing last ldap identity to another provider' do
+ it 'changes to normal block after changing last ldap identity to another provider' do
identity.update_attribute(:provider, 'twitter')
service.execute
diff --git a/spec/services/search_service_spec.rb b/spec/services/search_service_spec.rb
index 7b3a9a75d7c..bd89c4a7c11 100644
--- a/spec/services/search_service_spec.rb
+++ b/spec/services/search_service_spec.rb
@@ -16,7 +16,7 @@ describe 'Search::GlobalService', services: true do
describe '#execute' do
context 'unauthenticated' do
- it 'should return public projects only' do
+ it 'returns public projects only' do
context = Search::GlobalService.new(nil, search: "searchable")
results = context.execute
expect(results.objects('projects')).to match_array [public_project]
@@ -24,19 +24,19 @@ describe 'Search::GlobalService', services: true do
end
context 'authenticated' do
- it 'should return public, internal and private projects' do
+ it 'returns public, internal and private projects' do
context = Search::GlobalService.new(user, search: "searchable")
results = context.execute
expect(results.objects('projects')).to match_array [public_project, found_project, internal_project]
end
- it 'should return only public & internal projects' do
+ it 'returns only public & internal projects' do
context = Search::GlobalService.new(internal_user, search: "searchable")
results = context.execute
expect(results.objects('projects')).to match_array [internal_project, public_project]
end
- it 'namespace name should be searchable' do
+ it 'namespace name is searchable' do
context = Search::GlobalService.new(user, search: found_project.namespace.path)
results = context.execute
expect(results.objects('projects')).to match_array [found_project]
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb
index 43693441450..00427d6db2a 100644
--- a/spec/services/system_note_service_spec.rb
+++ b/spec/services/system_note_service_spec.rb
@@ -471,15 +471,15 @@ describe SystemNoteService, services: true do
shared_examples 'cross project mentionable' do
include GitlabMarkdownHelper
- it 'should contain cross reference to new noteable' do
+ it 'contains cross reference to new noteable' do
expect(subject.note).to include cross_project_reference(new_project, new_noteable)
end
- it 'should mention referenced noteable' do
+ it 'mentions referenced noteable' do
expect(subject.note).to include new_noteable.to_reference
end
- it 'should mention referenced project' do
+ it 'mentions referenced project' do
expect(subject.note).to include new_project.to_reference
end
end
@@ -489,7 +489,7 @@ describe SystemNoteService, services: true do
it_behaves_like 'cross project mentionable'
- it 'should notify about noteable being moved to' do
+ it 'notifies about noteable being moved to' do
expect(subject.note).to match /Moved to/
end
end
@@ -499,7 +499,7 @@ describe SystemNoteService, services: true do
it_behaves_like 'cross project mentionable'
- it 'should notify about noteable being moved from' do
+ it 'notifies about noteable being moved from' do
expect(subject.note).to match /Moved from/
end
end
@@ -507,7 +507,7 @@ describe SystemNoteService, services: true do
context 'invalid direction' do
let(:direction) { :invalid }
- it 'should raise error' do
+ it 'raises error' do
expect { subject }.to raise_error StandardError, /Invalid direction/
end
end
diff --git a/spec/services/test_hook_service_spec.rb b/spec/services/test_hook_service_spec.rb
index 4f47e89b4b5..4f6dd8c6d3f 100644
--- a/spec/services/test_hook_service_spec.rb
+++ b/spec/services/test_hook_service_spec.rb
@@ -6,7 +6,7 @@ describe TestHookService, services: true do
let(:hook) { create :project_hook, project: project }
describe '#execute' do
- it "should execute successfully" do
+ it "executes successfully" do
stub_request(:post, hook.url).to_return(status: 200)
expect(TestHookService.new.execute(hook, user)).to be_truthy
end