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
fdabcf35
Commit
fdabcf35
authored
Feb 03, 2020
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a flaky 'Projects::TracingsController' test
Signed-off-by:
Rémy Coutable
<
remy@rymai.me
>
parent
07bd816e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
14 deletions
+20
-14
ee/spec/controllers/projects/tracings_controller_spec.rb
ee/spec/controllers/projects/tracings_controller_spec.rb
+20
-14
No files found.
ee/spec/controllers/projects/tracings_controller_spec.rb
View file @
fdabcf35
...
@@ -9,30 +9,36 @@ describe Projects::TracingsController do
...
@@ -9,30 +9,36 @@ describe Projects::TracingsController do
shared_examples
'user with read access'
do
|
visibility_level
|
shared_examples
'user with read access'
do
|
visibility_level
|
let
(
:project
)
{
create
(
:project
,
visibility_level
)
}
let
(
:project
)
{
create
(
:project
,
visibility_level
)
}
before
do
%w[developer maintainer]
.
each
do
|
role
|
project
.
add_maintainer
(
user
)
context
"with a
#{
visibility_level
}
project and
#{
role
}
role"
do
end
before
do
project
.
add_role
(
user
,
role
)
end
it
'renders OK'
do
it
'renders OK'
do
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
render_template
(
:show
)
expect
(
response
).
to
render_template
(
:show
)
end
end
end
end
end
end
shared_examples
'user without read access'
do
|
visibility_level
|
shared_examples
'user without read access'
do
|
visibility_level
|
let
(
:project
)
{
create
(
:project
,
visibility_level
)
}
let
(
:project
)
{
create
(
:project
,
visibility_level
)
}
%w[guest reporter developer]
.
each
do
|
role
|
%w[guest reporter]
.
each
do
|
role
|
before
do
context
"with a
#{
visibility_level
}
project and
#{
role
}
role"
do
project
.
public_send
(
"add_
#{
role
}
"
,
user
)
before
do
end
project
.
add_role
(
user
,
role
)
end
it
'returns 404'
do
it
'returns 404'
do
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
get
:show
,
params:
{
namespace_id:
project
.
namespace
,
project_id:
project
}
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
expect
(
response
).
to
have_gitlab_http_status
(
:not_found
)
end
end
end
end
end
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