Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d33b22f2
Commit
d33b22f2
authored
Dec 05, 2016
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move admin hooks spinach to rspec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent
4e96c531
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
31 deletions
+12
-31
changelogs/unreleased/move-admin-hooks-spinach-test-to-rspec.yml
...ogs/unreleased/move-admin-hooks-spinach-test-to-rspec.yml
+4
-0
features/admin/hooks.feature
features/admin/hooks.feature
+0
-9
features/steps/admin/hooks.rb
features/steps/admin/hooks.rb
+0
-15
spec/features/admin/admin_hooks_spec.rb
spec/features/admin/admin_hooks_spec.rb
+8
-7
No files found.
changelogs/unreleased/move-admin-hooks-spinach-test-to-rspec.yml
0 → 100644
View file @
d33b22f2
---
title
:
Move admin hooks spinach to rspec
merge_request
:
7942
author
:
Semyon Pupkov
features/admin/hooks.feature
deleted
100644 → 0
View file @
4e96c531
@admin
Feature
:
Admin Hooks
Background
:
Given
I sign in as an admin
Scenario
:
On Admin Hooks
Given
I visit admin hooks page
Then
I submit the form with enabled SSL verification
And
I see new hook with enabled SSL verification
\ No newline at end of file
features/steps/admin/hooks.rb
deleted
100644 → 0
View file @
4e96c531
class
Spinach::Features::AdminHooks
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
step
"I submit the form with enabled SSL verification"
do
fill_in
'hook_url'
,
with:
'http://google.com'
check
"Enable SSL verification"
click_on
"Add System Hook"
end
step
"I see new hook with enabled SSL verification"
do
expect
(
page
).
to
have_content
"SSL Verification: enabled"
end
end
spec/features/admin/admin_hooks_spec.rb
View file @
d33b22f2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment