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
4e5e21df
Commit
4e5e21df
authored
Jul 04, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a named subject in `models/ee/board_spec.rb`
parent
2cd6f88c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
spec/models/ee/board_spec.rb
spec/models/ee/board_spec.rb
+9
-9
No files found.
spec/models/ee/board_spec.rb
View file @
4e5e21df
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
Board
do
describe
Board
do
describe
'milestone'
do
describe
'milestone'
do
subject
{
build
(
:board
)
}
subject
(
:board
)
{
build
(
:board
)
}
context
'when the feature is available'
do
context
'when the feature is available'
do
before
do
before
do
...
@@ -10,31 +10,31 @@ describe Board do
...
@@ -10,31 +10,31 @@ describe Board do
end
end
it
'returns Milestone::Upcoming for upcoming milestone id'
do
it
'returns Milestone::Upcoming for upcoming milestone id'
do
subject
.
milestone_id
=
Milestone
::
Upcoming
.
id
board
.
milestone_id
=
Milestone
::
Upcoming
.
id
expect
(
subject
.
milestone
).
to
eq
Milestone
::
Upcoming
expect
(
board
.
milestone
).
to
eq
Milestone
::
Upcoming
end
end
it
'returns milestone for valid milestone id'
do
it
'returns milestone for valid milestone id'
do
milestone
=
create
(
:milestone
)
milestone
=
create
(
:milestone
)
subject
.
milestone_id
=
milestone
.
id
board
.
milestone_id
=
milestone
.
id
expect
(
subject
.
milestone
).
to
eq
milestone
expect
(
board
.
milestone
).
to
eq
milestone
end
end
it
'returns nil for invalid milestone id'
do
it
'returns nil for invalid milestone id'
do
subject
.
milestone_id
=
-
1
board
.
milestone_id
=
-
1
expect
(
subject
.
milestone
).
to
be_nil
expect
(
board
.
milestone
).
to
be_nil
end
end
end
end
it
'returns nil when the feature is not available'
do
it
'returns nil when the feature is not available'
do
stub_licensed_features
(
issue_board_milestone:
false
)
stub_licensed_features
(
issue_board_milestone:
false
)
milestone
=
create
(
:milestone
)
milestone
=
create
(
:milestone
)
subject
.
milestone_id
=
milestone
.
id
board
.
milestone_id
=
milestone
.
id
expect
(
subject
.
milestone
).
to
be_nil
expect
(
board
.
milestone
).
to
be_nil
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