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
Boxiang Sun
gitlab-ce
Commits
eab81682
Commit
eab81682
authored
Mar 05, 2018
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add view spec for top
parent
c647787b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
spec/views/shared/milestones/_top.html.haml.rb
spec/views/shared/milestones/_top.html.haml.rb
+35
-0
No files found.
spec/views/shared/milestones/_top.html.haml.rb
0 → 100644
View file @
eab81682
require
'spec_helper'
describe
'shared/milestones/_top.html.haml'
do
let
(
:group
)
{
create
(
:group
)
}
let
(
:project
)
{
create
(
:project
,
group:
group
)
}
let
(
:milestone
)
{
create
(
:milestone
,
project:
project
)
}
before
do
allow
(
milestone
).
to
receive
(
:milestones
)
{
[]
}
end
it
'renders a deprecation message for a legacy milestone'
do
allow
(
milestone
).
to
receive
(
:legacy_group_milestone?
)
{
true
}
render
'shared/milestones/top'
,
milestone:
milestone
expect
(
rendered
).
to
have_css
(
'.milestone-deprecation-message'
)
end
it
'renders a deprecation message for a dashboard milestone'
do
allow
(
milestone
).
to
receive
(
:dashboard_milestone?
)
{
true
}
render
'shared/milestones/top'
,
milestone:
milestone
expect
(
rendered
).
to
have_css
(
'.milestone-deprecation-message'
)
end
it
'does not render a deprecation message for a non-legacy and non-dashboard milestone'
do
assign
:group
,
group
render
'shared/milestones/top'
,
milestone:
milestone
expect
(
rendered
).
not_to
have_css
(
'.milestone-deprecation-message'
)
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