diff options
author | Semyon Pupkov <mail@semyonpupkov.com> | 2016-12-05 23:50:13 +0500 |
---|---|---|
committer | Semyon Pupkov <mail@semyonpupkov.com> | 2016-12-06 22:58:15 +0500 |
commit | d33b22f23890f5d67f1e88a41efc4d8adec6611c (patch) | |
tree | 4e0b170c8d58a0d8b88e5d7a395b11d55f72cf13 /spec/features | |
parent | 4e96c53197e0521f13d9fb95692854fddeecf509 (diff) | |
download | gitlab-ce-d33b22f23890f5d67f1e88a41efc4d8adec6611c.tar.gz |
Move admin hooks spinach to rspec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
Diffstat (limited to 'spec/features')
-rw-r--r-- | spec/features/admin/admin_hooks_spec.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index b3ce72b1452..f246997d5a2 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -26,16 +26,17 @@ describe "Admin::Hooks", feature: true do 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 |