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
f1d7c416
Commit
f1d7c416
authored
Mar 02, 2017
by
Timothy Andrew
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EE-specific changes for #28251.
Specs that are EE-only need to be updated to use IIDs instead of IDs
parent
07d76aac
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+4
-4
spec/requests/api/merge_requests_spec.rb
spec/requests/api/merge_requests_spec.rb
+2
-2
No files found.
spec/requests/api/issues_spec.rb
View file @
f1d7c416
...
@@ -1180,7 +1180,7 @@ describe API::Issues, api: true do
...
@@ -1180,7 +1180,7 @@ describe API::Issues, api: true do
describe
'PUT /projects/:id/issues/:issue_id to update weight'
do
describe
'PUT /projects/:id/issues/:issue_id to update weight'
do
it
'updates an issue with no weight'
do
it
'updates an issue with no weight'
do
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
id
}
"
,
user
),
weight:
5
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
i
i
d
}
"
,
user
),
weight:
5
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'weight'
]).
to
eq
(
5
)
expect
(
json_response
[
'weight'
]).
to
eq
(
5
)
...
@@ -1189,21 +1189,21 @@ describe API::Issues, api: true do
...
@@ -1189,21 +1189,21 @@ describe API::Issues, api: true do
it
'removes a weight from an issue'
do
it
'removes a weight from an issue'
do
weighted_issue
=
create
(
:issue
,
project:
project
,
weight:
2
)
weighted_issue
=
create
(
:issue
,
project:
project
,
weight:
2
)
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
weighted_issue
.
id
}
"
,
user
),
weight:
nil
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
weighted_issue
.
i
i
d
}
"
,
user
),
weight:
nil
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'weight'
]).
to
be_nil
expect
(
json_response
[
'weight'
]).
to
be_nil
end
end
it
'returns 400 if weight is less than minimum weight'
do
it
'returns 400 if weight is less than minimum weight'
do
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
id
}
"
,
user
),
weight:
-
1
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
i
i
d
}
"
,
user
),
weight:
-
1
expect
(
response
).
to
have_http_status
(
400
)
expect
(
response
).
to
have_http_status
(
400
)
expect
(
json_response
[
'error'
]).
to
eq
(
'weight does not have a valid value'
)
expect
(
json_response
[
'error'
]).
to
eq
(
'weight does not have a valid value'
)
end
end
it
'returns 400 if weight is more than maximum weight'
do
it
'returns 400 if weight is more than maximum weight'
do
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
id
}
"
,
user
),
weight:
10
put
api
(
"/projects/
#{
project
.
id
}
/issues/
#{
issue
.
i
i
d
}
"
,
user
),
weight:
10
expect
(
response
).
to
have_http_status
(
400
)
expect
(
response
).
to
have_http_status
(
400
)
expect
(
json_response
[
'error'
]).
to
eq
(
'weight does not have a valid value'
)
expect
(
json_response
[
'error'
]).
to
eq
(
'weight does not have a valid value'
)
...
...
spec/requests/api/merge_requests_spec.rb
View file @
f1d7c416
...
@@ -574,7 +574,7 @@ describe API::MergeRequests, api: true do
...
@@ -574,7 +574,7 @@ describe API::MergeRequests, api: true do
it
"updates the MR's squash attribute"
do
it
"updates the MR's squash attribute"
do
expect
do
expect
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
id
}
/merge"
,
user
),
squash:
true
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
i
i
d
}
/merge"
,
user
),
squash:
true
end
.
to
change
{
merge_request
.
reload
.
squash
}
end
.
to
change
{
merge_request
.
reload
.
squash
}
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
...
@@ -633,7 +633,7 @@ describe API::MergeRequests, api: true do
...
@@ -633,7 +633,7 @@ describe API::MergeRequests, api: true do
end
end
it
"updates squash and returns merge_request"
do
it
"updates squash and returns merge_request"
do
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
id
}
"
,
user
),
squash:
true
put
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
i
i
d
}
"
,
user
),
squash:
true
expect
(
response
).
to
have_http_status
(
200
)
expect
(
response
).
to
have_http_status
(
200
)
expect
(
json_response
[
'squash'
]).
to
be_truthy
expect
(
json_response
[
'squash'
]).
to
be_truthy
...
...
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