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
ca7bd18c
Commit
ca7bd18c
authored
Jul 15, 2021
by
Gary Holtz
Committed by
nmilojevic1
Jul 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjusting some spec syntax
parent
66aaecc7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+8
-5
No files found.
spec/requests/api/projects_spec.rb
View file @
ca7bd18c
...
@@ -3139,23 +3139,26 @@ RSpec.describe API::Projects do
...
@@ -3139,23 +3139,26 @@ RSpec.describe API::Projects do
end
end
it
'updates squash_option'
do
it
'updates squash_option'
do
project3
.
update!
(
squash_option:
'always'
)
project_param
=
{
squash_option:
"default_on"
}
project_param
=
{
squash_option:
"default_on"
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
params:
project_param
expect
{
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
params:
project_param
}
.
to
change
{
project3
.
reload
.
squash_option
}
.
from
(
'always'
)
.
to
(
'default_on'
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
response
).
to
have_gitlab_http_status
(
:ok
)
expect
(
project3
.
reload
.
squash_option
).
to
eq
(
"default_on"
)
expect
(
json_response
[
'squash_option'
]).
to
eq
(
"default_on"
)
expect
(
json_response
[
'squash_option'
]).
to
eq
(
"default_on"
)
end
end
it
'does not update an invalid squash_option'
do
it
'does not update an invalid squash_option'
do
current_squash_option
=
project3
.
reload
.
squash_option
project_param
=
{
squash_option:
"jawn"
}
project_param
=
{
squash_option:
"jawn"
}
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
params:
project_param
expect
{
put
api
(
"/projects/
#{
project3
.
id
}
"
,
user
),
params:
project_param
}
.
not_to
change
{
project3
.
reload
.
squash_option
}
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
response
).
to
have_gitlab_http_status
(
:bad_request
)
expect
(
project3
.
reload
.
squash_option
).
to
eq
(
current_squash_option
)
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