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
5f127bab
Commit
5f127bab
authored
Feb 05, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix API variable specs
parent
0ccbc651
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
spec/requests/api/group_variables_spec.rb
spec/requests/api/group_variables_spec.rb
+2
-2
spec/requests/api/variables_spec.rb
spec/requests/api/variables_spec.rb
+2
-2
No files found.
spec/requests/api/group_variables_spec.rb
View file @
5f127bab
...
...
@@ -142,12 +142,12 @@ describe API::GroupVariables do
end
it
'updates variable data'
do
initial_variable
=
group
.
variables
.
first
initial_variable
=
group
.
variables
.
reload
.
first
value_before
=
initial_variable
.
value
put
api
(
"/groups/
#{
group
.
id
}
/variables/
#{
variable
.
key
}
"
,
user
),
value:
'VALUE_1_UP'
,
protected:
true
updated_variable
=
group
.
variables
.
first
updated_variable
=
group
.
variables
.
reload
.
first
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
value_before
).
to
eq
(
variable
.
value
)
...
...
spec/requests/api/variables_spec.rb
View file @
5f127bab
...
...
@@ -122,12 +122,12 @@ describe API::Variables do
describe
'PUT /projects/:id/variables/:key'
do
context
'authorized user with proper permissions'
do
it
'updates variable data'
do
initial_variable
=
project
.
variables
.
first
initial_variable
=
project
.
variables
.
reload
.
first
value_before
=
initial_variable
.
value
put
api
(
"/projects/
#{
project
.
id
}
/variables/
#{
variable
.
key
}
"
,
user
),
value:
'VALUE_1_UP'
,
protected:
true
updated_variable
=
project
.
variables
.
first
updated_variable
=
project
.
variables
.
reload
.
first
expect
(
response
).
to
have_gitlab_http_status
(
200
)
expect
(
value_before
).
to
eq
(
variable
.
value
)
...
...
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