diff options
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/disable_email_interceptor_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/extracts_path_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/asciidoc_spec.rb | 4 | ||||
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 10 | ||||
-rw-r--r-- | spec/lib/gitlab/ldap/access_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/ldap/user_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/o_auth/user_spec.rb | 6 | ||||
-rw-r--r-- | spec/lib/gitlab/project_search_results_spec.rb | 12 | ||||
-rw-r--r-- | spec/lib/gitlab/saml/user_spec.rb | 10 | ||||
-rw-r--r-- | spec/lib/gitlab/search_results_spec.rb | 12 | ||||
-rw-r--r-- | spec/lib/gitlab/upgrader_spec.rb | 6 |
11 files changed, 35 insertions, 35 deletions
diff --git a/spec/lib/disable_email_interceptor_spec.rb b/spec/lib/disable_email_interceptor_spec.rb index 309a88151cf..8f51474476d 100644 --- a/spec/lib/disable_email_interceptor_spec.rb +++ b/spec/lib/disable_email_interceptor_spec.rb @@ -5,7 +5,7 @@ describe DisableEmailInterceptor, lib: true do Mail.register_interceptor(DisableEmailInterceptor) end - it 'should not send emails' do + it 'does not send emails' do allow(Gitlab.config.gitlab).to receive(:email_enabled).and_return(false) expect { deliver_mail }.not_to change(ActionMailer::Base.deliveries, :count) end diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb index 566035c60d0..b12a7b98d4d 100644 --- a/spec/lib/extracts_path_spec.rb +++ b/spec/lib/extracts_path_spec.rb @@ -25,7 +25,7 @@ describe ExtractsPath, lib: true do @project = create(:project) end - it "log tree path should have no escape sequences" do + it "log tree path has no escape sequences" do assign_ref_vars expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb") end @@ -33,7 +33,7 @@ describe ExtractsPath, lib: true do context 'escaped sequences in ref' do let(:ref) { "improve%2Fawesome" } - it "id should have no escape sequences" do + it "id has no escape sequences" do assign_ref_vars expect(@ref).to eq('improve/awesome') expect(@logs_path).to eq("/#{@project.path_with_namespace}/refs/#{ref}/logs_tree/files/ruby/popen.rb") diff --git a/spec/lib/gitlab/asciidoc_spec.rb b/spec/lib/gitlab/asciidoc_spec.rb index 32ca8239845..4aba783dc33 100644 --- a/spec/lib/gitlab/asciidoc_spec.rb +++ b/spec/lib/gitlab/asciidoc_spec.rb @@ -8,7 +8,7 @@ module Gitlab let(:html) { 'H<sub>2</sub>O' } context "without project" do - it "should convert the input using Asciidoctor and default options" do + it "converts the input using Asciidoctor and default options" do expected_asciidoc_opts = { safe: :secure, backend: :html5, @@ -24,7 +24,7 @@ module Gitlab context "with asciidoc_opts" do let(:asciidoc_opts) { { safe: :safe, attributes: ['foo'] } } - it "should merge the options with default ones" do + it "merges the options with default ones" do expected_asciidoc_opts = { safe: :safe, backend: :html5, diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 7bec1367156..b0772cad312 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -51,24 +51,24 @@ describe Gitlab::Auth, lib: true do let(:username) { 'John' } # username isn't lowercase, test this let(:password) { 'my-secret' } - it "should find user by valid login/password" do + it "finds user by valid login/password" do expect( gl_auth.find_with_user_password(username, password) ).to eql user end - it 'should find user by valid email/password with case-insensitive email' do + it 'finds user by valid email/password with case-insensitive email' do expect(gl_auth.find_with_user_password(user.email.upcase, password)).to eql user end - it 'should find user by valid username/password with case-insensitive username' do + it 'finds user by valid username/password with case-insensitive username' do expect(gl_auth.find_with_user_password(username.upcase, password)).to eql user end - it "should not find user with invalid password" do + it "does not find user with invalid password" do password = 'wrong' expect( gl_auth.find_with_user_password(username, password) ).not_to eql user end - it "should not find user with invalid login" do + it "does not find user with invalid login" do user = 'wrong' expect( gl_auth.find_with_user_password(username, password) ).not_to eql user end diff --git a/spec/lib/gitlab/ldap/access_spec.rb b/spec/lib/gitlab/ldap/access_spec.rb index acd5394382c..534bcbf39fe 100644 --- a/spec/lib/gitlab/ldap/access_spec.rb +++ b/spec/lib/gitlab/ldap/access_spec.rb @@ -64,7 +64,7 @@ describe Gitlab::LDAP::Access, lib: true do user.ldap_block end - it 'should unblock user in GitLab' do + it 'unblocks user in GitLab' do access.allowed? expect(user).not_to be_blocked end diff --git a/spec/lib/gitlab/ldap/user_spec.rb b/spec/lib/gitlab/ldap/user_spec.rb index 949f6e2b19a..89790c9e1af 100644 --- a/spec/lib/gitlab/ldap/user_spec.rb +++ b/spec/lib/gitlab/ldap/user_spec.rb @@ -36,7 +36,7 @@ describe Gitlab::LDAP::User, lib: true do expect(ldap_user.changed?).to be_truthy end - it "dont marks existing ldap user as changed" do + it "does not mark existing ldap user as changed" do create(:omniauth_user, email: 'john@example.com', extern_uid: 'my-uid', provider: 'ldapmain', ldap_email: true) expect(ldap_user.changed?).to be_falsey end diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb index 1fca8a13037..78c669e8fa5 100644 --- a/spec/lib/gitlab/o_auth/user_spec.rb +++ b/spec/lib/gitlab/o_auth/user_spec.rb @@ -42,7 +42,7 @@ describe Gitlab::OAuth::User, lib: true do describe 'signup' do shared_examples 'to verify compliance with allow_single_sign_on' do context 'provider is marked as external' do - it 'should mark user as external' do + it 'marks user as external' do stub_omniauth_config(allow_single_sign_on: ['twitter'], external_providers: ['twitter']) oauth_user.save expect(gl_user).to be_valid @@ -51,7 +51,7 @@ describe Gitlab::OAuth::User, lib: true do end context 'provider was external, now has been removed' do - it 'should not mark external user as internal' do + it 'does not mark external user as internal' do create(:omniauth_user, extern_uid: 'my-uid', provider: 'twitter', external: true) stub_omniauth_config(allow_single_sign_on: ['twitter'], external_providers: ['facebook']) oauth_user.save @@ -62,7 +62,7 @@ describe Gitlab::OAuth::User, lib: true do context 'provider is not external' do context 'when adding a new OAuth identity' do - it 'should not promote an external user to internal' do + it 'does not promote an external user to internal' do user = create(:user, email: 'john@mail.com', external: true) user.identities.create(provider: provider, extern_uid: uid) diff --git a/spec/lib/gitlab/project_search_results_spec.rb b/spec/lib/gitlab/project_search_results_spec.rb index 270b89972d7..29abb4d4d07 100644 --- a/spec/lib/gitlab/project_search_results_spec.rb +++ b/spec/lib/gitlab/project_search_results_spec.rb @@ -33,7 +33,7 @@ describe Gitlab::ProjectSearchResults, lib: 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 non project members' do + it 'does not list project confidential issues for non project members' do results = described_class.new(non_member, project, query) issues = results.objects('issues') @@ -43,7 +43,7 @@ describe Gitlab::ProjectSearchResults, lib: true do expect(results.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] results = described_class.new(member, project, query) @@ -55,7 +55,7 @@ describe Gitlab::ProjectSearchResults, lib: true do expect(results.issues_count).to eq 1 end - it 'should list project confidential issues for author' do + it 'lists project confidential issues for author' do results = described_class.new(author, project, query) issues = results.objects('issues') @@ -65,7 +65,7 @@ describe Gitlab::ProjectSearchResults, lib: true do expect(results.issues_count).to eq 2 end - it 'should list project confidential issues for assignee' do + it 'lists project confidential issues for assignee' do results = described_class.new(assignee, project.id, query) issues = results.objects('issues') @@ -75,7 +75,7 @@ describe Gitlab::ProjectSearchResults, lib: true do expect(results.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] results = described_class.new(member, project, query) @@ -87,7 +87,7 @@ describe Gitlab::ProjectSearchResults, lib: true do expect(results.issues_count).to eq 3 end - it 'should list all project issues for admin' do + it 'lists all project issues for admin' do results = described_class.new(admin, project, query) issues = results.objects('issues') diff --git a/spec/lib/gitlab/saml/user_spec.rb b/spec/lib/gitlab/saml/user_spec.rb index 56bf08e7041..02c139f1a0d 100644 --- a/spec/lib/gitlab/saml/user_spec.rb +++ b/spec/lib/gitlab/saml/user_spec.rb @@ -67,7 +67,7 @@ describe Gitlab::Saml::User, lib: true do end context 'user was external, now should not be' do - it 'should make user internal' do + it 'makes user internal' do existing_user.update_attribute('external', true) saml_user.save expect(gl_user).to be_valid @@ -94,14 +94,14 @@ describe Gitlab::Saml::User, lib: true do context 'with allow_single_sign_on default (["saml"])' do before { stub_omniauth_config(allow_single_sign_on: ['saml']) } - it 'should not throw an error' do + it 'does not throw an error' do expect{ saml_user.save }.not_to raise_error end end context 'with allow_single_sign_on disabled' do before { stub_omniauth_config(allow_single_sign_on: false) } - it 'should throw an error' do + it 'throws an error' do expect{ saml_user.save }.to raise_error StandardError end end @@ -223,7 +223,7 @@ describe Gitlab::Saml::User, lib: true do context 'dont block on create' do before { stub_omniauth_config(block_auto_created_users: false) } - it 'should not block the user' do + it 'does not block the user' do saml_user.save expect(gl_user).to be_valid expect(gl_user).not_to be_blocked @@ -233,7 +233,7 @@ describe Gitlab::Saml::User, lib: true do context 'block on create' do before { stub_omniauth_config(block_auto_created_users: true) } - it 'should block user' do + it 'blocks user' do saml_user.save expect(gl_user).to be_valid expect(gl_user).to be_blocked diff --git a/spec/lib/gitlab/search_results_spec.rb b/spec/lib/gitlab/search_results_spec.rb index 1bb444bf34f..8a656ab0ee9 100644 --- a/spec/lib/gitlab/search_results_spec.rb +++ b/spec/lib/gitlab/search_results_spec.rb @@ -73,7 +73,7 @@ describe Gitlab::SearchResults do let!(:security_issue_4) { create(:issue, :confidential, project: project_3, title: 'Security issue 4', assignee: assignee) } let!(:security_issue_5) { create(:issue, :confidential, project: project_4, title: 'Security issue 5') } - it 'should not list confidential issues for non project members' do + it 'does not list confidential issues for non project members' do results = described_class.new(non_member, limit_projects, query) issues = results.objects('issues') @@ -86,7 +86,7 @@ describe Gitlab::SearchResults do expect(results.issues_count).to eq 1 end - it 'should not list confidential issues for project members with guest role' do + it 'does not list confidential issues for project members with guest role' do project_1.team << [member, :guest] project_2.team << [member, :guest] @@ -102,7 +102,7 @@ describe Gitlab::SearchResults do expect(results.issues_count).to eq 1 end - it 'should list confidential issues for author' do + it 'lists confidential issues for author' do results = described_class.new(author, limit_projects, query) issues = results.objects('issues') @@ -115,7 +115,7 @@ describe Gitlab::SearchResults do expect(results.issues_count).to eq 3 end - it 'should list confidential issues for assignee' do + it 'lists confidential issues for assignee' do results = described_class.new(assignee, limit_projects, query) issues = results.objects('issues') @@ -128,7 +128,7 @@ describe Gitlab::SearchResults do expect(results.issues_count).to eq 3 end - it 'should list confidential issues for project members' do + it 'lists confidential issues for project members' do project_1.team << [member, :developer] project_2.team << [member, :developer] @@ -144,7 +144,7 @@ describe Gitlab::SearchResults do expect(results.issues_count).to eq 4 end - it 'should list all issues for admin' do + it 'lists all issues for admin' do results = described_class.new(admin, limit_projects, query) issues = results.objects('issues') diff --git a/spec/lib/gitlab/upgrader_spec.rb b/spec/lib/gitlab/upgrader_spec.rb index e958e087a80..edadab043d7 100644 --- a/spec/lib/gitlab/upgrader_spec.rb +++ b/spec/lib/gitlab/upgrader_spec.rb @@ -9,19 +9,19 @@ describe Gitlab::Upgrader, lib: true do end describe 'latest_version?' do - it 'should be true if newest version' do + it 'is true if newest version' do allow(upgrader).to receive(:latest_version_raw).and_return(current_version) expect(upgrader.latest_version?).to be_truthy end end describe 'latest_version_raw' do - it 'should be latest version for GitLab 5' do + it 'is the latest version for GitLab 5' do allow(upgrader).to receive(:current_version_raw).and_return("5.3.0") expect(upgrader.latest_version_raw).to eq("v5.4.2") end - it 'should get the latest version from tags' do + it 'gets the latest version from tags' do allow(upgrader).to receive(:fetch_git_tags).and_return([ '6f0733310546402c15d3ae6128a95052f6c8ea96 refs/tags/v7.1.1', 'facfec4b242ce151af224e20715d58e628aa5e74 refs/tags/v7.1.1^{}', |