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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
111a83f5
Commit
111a83f5
authored
Dec 07, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tests to reflect new Geo admin page UX
parent
e100b16c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
spec/controllers/admin/geo_nodes_controller_spec.rb
spec/controllers/admin/geo_nodes_controller_spec.rb
+4
-6
spec/features/admin/admin_geo_nodes_spec.rb
spec/features/admin/admin_geo_nodes_spec.rb
+5
-6
No files found.
spec/controllers/admin/geo_nodes_controller_spec.rb
View file @
111a83f5
...
...
@@ -30,8 +30,10 @@ describe Admin::GeoNodesController, :postgresql do
allow
(
Gitlab
::
Geo
).
to
receive
(
:license_allows?
).
and_return
(
true
)
end
it
'renders creation form'
do
expect
(
go
).
to
render_template
(
partial:
'admin/geo_nodes/_form'
)
it
'does not display a flash message'
do
go
expect
(
flash
).
not_to
include
(
:alert
)
end
end
...
...
@@ -40,10 +42,6 @@ describe Admin::GeoNodesController, :postgresql do
allow
(
Gitlab
::
Geo
).
to
receive
(
:license_allows?
).
and_return
(
false
)
end
it
'does not render the creation form'
do
expect
(
go
).
not_to
render_template
(
partial:
'admin/geo_nodes/_form'
)
end
it
'displays a flash message'
do
go
...
...
spec/features/admin/admin_geo_nodes_spec.rb
View file @
111a83f5
...
...
@@ -8,9 +8,10 @@ RSpec.describe 'admin Geo Nodes', type: :feature do
sign_in
(
create
(
:admin
))
end
it
'show all public Geo Nodes'
do
it
'show all public Geo Nodes
and create new node link
'
do
visit
admin_geo_nodes_path
expect
(
page
).
to
have_link
(
'New node'
,
href:
new_admin_geo_node_path
)
page
.
within
(
find
(
'.geo-nodes'
,
match: :first
))
do
expect
(
page
).
to
have_content
(
geo_node
.
url
)
end
...
...
@@ -20,7 +21,7 @@ RSpec.describe 'admin Geo Nodes', type: :feature do
let
(
:new_ssh_key
)
{
attributes_for
(
:key
)[
:key
]
}
before
do
visit
admin_geo_nodes
_path
visit
new_admin_geo_node
_path
end
it
'creates a new Geo Node'
do
...
...
@@ -36,12 +37,10 @@ RSpec.describe 'admin Geo Nodes', type: :feature do
end
it
'returns an error message when a duplicate primary is added'
do
check
'This is a primary node'
fill_in
'geo_node_url'
,
with:
'https://test.example.com'
click_button
'Add Node'
create
(
:geo_node
,
:primary
)
check
'This is a primary node'
fill_in
'geo_node_url'
,
with:
'https://
second
ary.example.com'
fill_in
'geo_node_url'
,
with:
'https://
another-prim
ary.example.com'
click_button
'Add Node'
expect
(
current_path
).
to
eq
admin_geo_nodes_path
...
...
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