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
f5d33bc1
Commit
f5d33bc1
authored
Oct 15, 2020
by
drew cimino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify some RSpec expectations
parent
5d3c1ceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
spec/serializers/merge_request_widget_entity_spec.rb
spec/serializers/merge_request_widget_entity_spec.rb
+6
-2
No files found.
spec/serializers/merge_request_widget_entity_spec.rb
View file @
f5d33bc1
...
@@ -102,6 +102,8 @@ RSpec.describe MergeRequestWidgetEntity do
...
@@ -102,6 +102,8 @@ RSpec.describe MergeRequestWidgetEntity do
context
'with report artifacts'
do
context
'with report artifacts'
do
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
:with_codequality_report
,
project:
project
)
}
let
(
:pipeline
)
{
create
(
:ci_pipeline
,
:with_codequality_report
,
project:
project
)
}
let
(
:generic_job_id
)
{
pipeline
.
builds
.
first
.
id
}
let
(
:merge_base_job_id
)
{
merge_base_pipeline
.
builds
.
first
.
id
}
it
'has head_path and base_path entries'
do
it
'has head_path and base_path entries'
do
expect
(
subject
[
:codeclimate
][
:head_path
]).
to
be_present
expect
(
subject
[
:codeclimate
][
:head_path
]).
to
be_present
...
@@ -113,7 +115,8 @@ RSpec.describe MergeRequestWidgetEntity do
...
@@ -113,7 +115,8 @@ RSpec.describe MergeRequestWidgetEntity do
context
'with merge_base_pipelines enabled'
do
context
'with merge_base_pipelines enabled'
do
it
'returns URLs from the head_pipeline and merge_base_pipeline'
do
it
'returns URLs from the head_pipeline and merge_base_pipeline'
do
expect
(
subject
[
:codeclimate
][
:head_path
]).
not_to
eq
(
subject
[
:codeclimate
][
:base_path
])
expect
(
subject
[
:codeclimate
][
:head_path
]).
to
include
(
"/jobs/
#{
generic_job_id
}
/artifacts/download?file_type=codequality"
)
expect
(
subject
[
:codeclimate
][
:base_path
]).
to
include
(
"/jobs/
#{
merge_base_job_id
}
/artifacts/download?file_type=codequality"
)
end
end
end
end
...
@@ -123,7 +126,8 @@ RSpec.describe MergeRequestWidgetEntity do
...
@@ -123,7 +126,8 @@ RSpec.describe MergeRequestWidgetEntity do
end
end
it
'returns URLs from the head_pipeline and base_pipeline'
do
it
'returns URLs from the head_pipeline and base_pipeline'
do
expect
(
subject
[
:codeclimate
][
:head_path
]).
to
eq
(
subject
[
:codeclimate
][
:base_path
])
expect
(
subject
[
:codeclimate
][
:head_path
]).
to
include
(
"/jobs/
#{
generic_job_id
}
/artifacts/download?file_type=codequality"
)
expect
(
subject
[
:codeclimate
][
:base_path
]).
to
include
(
"/jobs/
#{
generic_job_id
}
/artifacts/download?file_type=codequality"
)
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