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
29a64950
Commit
29a64950
authored
Sep 21, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve specs
parent
630b666c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+1
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+4
-4
No files found.
spec/models/merge_request_spec.rb
View file @
29a64950
...
...
@@ -724,6 +724,7 @@ describe MergeRequest, models: true do
fork_project
.
create_forked_project_link
(
forked_to_project_id:
fork_project
.
id
,
forked_from_project_id:
project
.
id
)
end
end
let
(
:merge_request
)
do
create
(
:merge_request
,
source_project:
source_project
,
source_branch:
'feature'
,
...
...
spec/models/project_spec.rb
View file @
29a64950
...
...
@@ -1661,11 +1661,11 @@ describe Project, models: true do
end
it
'does not return environment when no with_tags is set'
do
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
)).
not_to
contain_exactly
(
environment
)
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
)).
to
be_empty
end
it
'does not return environment when commit is not part of deployment'
do
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
(
'feature'
))).
not_to
contain_exactly
(
environment
)
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
(
'feature'
))).
to
be_empty
end
end
...
...
@@ -1679,11 +1679,11 @@ describe Project, models: true do
end
it
'does not environment when ref is different'
do
expect
(
project
.
environments_for
(
'feature'
,
project
.
commit
)).
not_to
contain_exactly
(
environment
)
expect
(
project
.
environments_for
(
'feature'
,
project
.
commit
)).
to
be_empty
end
it
'does not return environment when commit is not part of deployment'
do
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
(
'feature'
))).
not_to
contain_exactly
(
environment
)
expect
(
project
.
environments_for
(
'master'
,
project
.
commit
(
'feature'
))).
to
be_empty
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