diff options
author | Robert Speicher <robert@gitlab.com> | 2017-05-18 19:43:52 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-05-18 19:43:52 +0000 |
commit | 36ede00876aacd0005eac8e9b4779e3014519e0c (patch) | |
tree | 3f21ccb09665c57446f6ad3fe1d8b5a9c95ffc93 | |
parent | 9616027045b68a8d238ca24d3116ff6f7bf9b3dc (diff) | |
parent | d900f19dfa15073e43150f9fab6495ad09ca6f9a (diff) | |
download | gitlab-ce-36ede00876aacd0005eac8e9b4779e3014519e0c.tar.gz |
Merge branch 'rubocop-empty-example-group' into 'master'
Enable the RSpec/EmptyExampleGroup cop
See merge request !11497
-rw-r--r-- | .rubocop.yml | 6 | ||||
-rw-r--r-- | .rubocop_todo.yml | 5 | ||||
-rw-r--r-- | spec/features/issues_spec.rb | 16 | ||||
-rw-r--r-- | spec/models/project_snippet_spec.rb | 3 | ||||
-rw-r--r-- | spec/models/protected_branch_spec.rb | 3 | ||||
-rw-r--r-- | spec/routing/routing_spec.rb | 37 |
6 files changed, 33 insertions, 37 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 9380f65eb65..f4848606896 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -969,6 +969,12 @@ RSpec/DescribeSymbol: RSpec/DescribedClass: Enabled: true +# Configuration parameters: CustomIncludeMethods. +RSpec/EmptyExampleGroup: + Enabled: true + CustomIncludeMethods: + - run_permission_checks + # Checks for long example. RSpec/ExampleLength: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0ea0b1a848d..cf30f5728c0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,11 +10,6 @@ RSpec/BeforeAfterAll: Enabled: false -# Offense count: 15 -# Configuration parameters: CustomIncludeMethods. -RSpec/EmptyExampleGroup: - Enabled: false - # Offense count: 233 RSpec/EmptyLineAfterFinalLet: Enabled: false diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index da369a6f111..06ed2dbac64 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -30,13 +30,6 @@ describe 'Issues', feature: true do it 'opens new issue popup' do expect(page).to have_content("Issue ##{issue.iid}") end - - describe 'fill in' do - before do - fill_in 'issue_title', with: 'bug 345' - fill_in 'issue_description', with: 'bug description' - end - end end describe 'Editing issue assignee' do @@ -557,15 +550,6 @@ describe 'Issues', feature: true do expect(page).to have_content milestone.title end end - - describe 'removing assignee' do - let(:user2) { create(:user) } - - before do - issue.assignees << user2 - issue.save - end - end end describe 'new issue' do diff --git a/spec/models/project_snippet_spec.rb b/spec/models/project_snippet_spec.rb index d9d7c0b0aaa..5fe4885eeb4 100644 --- a/spec/models/project_snippet_spec.rb +++ b/spec/models/project_snippet_spec.rb @@ -5,9 +5,6 @@ describe ProjectSnippet, models: true do it { is_expected.to belong_to(:project) } end - describe "Mass assignment" do - end - describe "Validation" do it { is_expected.to validate_presence_of(:project) } end diff --git a/spec/models/protected_branch_spec.rb b/spec/models/protected_branch_spec.rb index 179a443c43d..ca347cf92c9 100644 --- a/spec/models/protected_branch_spec.rb +++ b/spec/models/protected_branch_spec.rb @@ -7,9 +7,6 @@ describe ProtectedBranch, models: true do it { is_expected.to belong_to(:project) } end - describe "Mass assignment" do - end - describe 'Validation' do it { is_expected.to validate_presence_of(:project) } it { is_expected.to validate_presence_of(:name) } diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb index 9f6defe1450..abacc50a371 100644 --- a/spec/routing/routing_spec.rb +++ b/spec/routing/routing_spec.rb @@ -249,17 +249,34 @@ describe RootController, 'routing' do end end -# new_user_session GET /users/sign_in(.:format) devise/sessions#new -# user_session POST /users/sign_in(.:format) devise/sessions#create -# destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy -# user_omniauth_authorize /users/auth/:provider(.:format) omniauth_callbacks#passthru -# user_omniauth_callback /users/auth/:action/callback(.:format) omniauth_callbacks#(?-mix:(?!)) -# user_password POST /users/password(.:format) devise/passwords#create -# new_user_password GET /users/password/new(.:format) devise/passwords#new -# edit_user_password GET /users/password/edit(.:format) devise/passwords#edit -# PUT /users/password(.:format) devise/passwords#update describe "Authentication", "routing" do - # pending + it "GET /users/sign_in" do + expect(get("/users/sign_in")).to route_to('sessions#new') + end + + it "POST /users/sign_in" do + expect(post("/users/sign_in")).to route_to('sessions#create') + end + + it "DELETE /users/sign_out" do + expect(delete("/users/sign_out")).to route_to('sessions#destroy') + end + + it "POST /users/password" do + expect(post("/users/password")).to route_to('passwords#create') + end + + it "GET /users/password/new" do + expect(get("/users/password/new")).to route_to('passwords#new') + end + + it "GET /users/password/edit" do + expect(get("/users/password/edit")).to route_to('passwords#edit') + end + + it "PUT /users/password" do + expect(put("/users/password")).to route_to('passwords#update') + end end describe "Groups", "routing" do |