Skip to content

Commit

Permalink
Merge branch 'move-admin-hooks-spinach-test-to-rspec' into 'master'
Browse files Browse the repository at this point in the history
Move admin hooks spinach to RSpec

https://gitlab.com/gitlab-org/gitlab-ce/issues/23036

See merge request !7942
  • Loading branch information
rymai committed Dec 7, 2016
2 parents 0fc1e9a + d33b22f commit 911c160
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 31 deletions.
@@ -0,0 +1,4 @@
---
title: Move admin hooks spinach to rspec
merge_request: 7942
author: Semyon Pupkov
9 changes: 0 additions & 9 deletions features/admin/hooks.feature

This file was deleted.

15 changes: 0 additions & 15 deletions features/steps/admin/hooks.rb

This file was deleted.

15 changes: 8 additions & 7 deletions spec/features/admin/admin_hooks_spec.rb
Expand Up @@ -26,16 +26,17 @@
end

describe "New Hook" do
before do
@url = FFaker::Internet.uri("http")
let(:url) { FFaker::Internet.uri('http') }

it 'adds new hook' do
visit admin_hooks_path
fill_in "hook_url", with: @url
expect { click_button "Add System Hook" }.to change(SystemHook, :count).by(1)
end
fill_in 'hook_url', with: url
check 'Enable SSL verification'

it "opens new hook popup" do
expect { click_button 'Add System Hook' }.to change(SystemHook, :count).by(1)
expect(page).to have_content 'SSL Verification: enabled'
expect(current_path).to eq(admin_hooks_path)
expect(page).to have_content(@url)
expect(page).to have_content(url)
end
end

Expand Down

0 comments on commit 911c160

Please sign in to comment.