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
55d32106
Commit
55d32106
authored
Sep 19, 2019
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor presenter specs
parent
1f2fc99a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
spec/presenters/project_presenter_spec.rb
spec/presenters/project_presenter_spec.rb
+20
-15
No files found.
spec/presenters/project_presenter_spec.rb
View file @
55d32106
...
...
@@ -429,22 +429,27 @@ describe ProjectPresenter do
a_string_including
(
'CONTRIBUTING'
)
)
end
end
context
'empty repo'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
describe
'#empty_repo_statistics_buttons'
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:presenter
)
{
described_class
.
new
(
project
,
current_user:
user
)
}
it
'orders the items correctly in an empty project'
do
project
.
add_developer
(
user
)
allow
(
project
).
to
receive
(
:auto_devops_enabled?
).
and_return
(
false
)
buttons
=
presenter
.
empty_repo_statistics_buttons
expect
(
buttons
.
map
(
&
:label
)).
to
start_with
(
a_string_including
(
'New'
),
a_string_including
(
'README'
),
a_string_including
(
'CHANGELOG'
),
a_string_including
(
'CONTRIBUTING'
),
a_string_including
(
'CI/CD'
)
)
end
subject
(
:empty_repo_statistics_buttons
)
{
presenter
.
empty_repo_statistics_buttons
}
before
do
project
.
add_developer
(
user
)
allow
(
project
).
to
receive
(
:auto_devops_enabled?
).
and_return
(
false
)
end
it
'orders the items correctly in an empty project'
do
expect
(
empty_repo_statistics_buttons
.
map
(
&
:label
)).
to
start_with
(
a_string_including
(
'New'
),
a_string_including
(
'README'
),
a_string_including
(
'CHANGELOG'
),
a_string_including
(
'CONTRIBUTING'
),
a_string_including
(
'CI/CD'
)
)
end
end
end
\ No newline at end of file
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