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
Léo-Paul Géneau
gitlab-ce
Commits
2592aec9
Commit
2592aec9
authored
Jan 23, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use all parameters in VariablesController specs
parent
dcc23530
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
10 deletions
+26
-10
spec/controllers/groups/variables_controller_spec.rb
spec/controllers/groups/variables_controller_spec.rb
+13
-5
spec/controllers/projects/variables_controller_spec.rb
spec/controllers/projects/variables_controller_spec.rb
+13
-5
No files found.
spec/controllers/groups/variables_controller_spec.rb
View file @
2592aec9
...
...
@@ -16,8 +16,11 @@ describe Groups::VariablesController do
subject
do
post
:save_multiple
,
group_id:
group
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
},
{
key:
'..?'
,
value:
'dummy_value'
}],
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
,
protected:
variable
.
protected?
.
to_s
},
{
key:
'..?'
,
value:
'dummy_value'
,
protected:
'false'
}],
format: :json
end
...
...
@@ -40,8 +43,11 @@ describe Groups::VariablesController do
subject
do
post
:save_multiple
,
group_id:
group
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
},
{
key:
'new_key'
,
value:
'dummy_value'
}],
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
,
protected:
variable
.
protected?
.
to_s
},
{
key:
'new_key'
,
value:
'dummy_value'
,
protected:
'false'
}],
format: :json
end
...
...
@@ -65,7 +71,9 @@ describe Groups::VariablesController do
post
:save_multiple
,
group_id:
group
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
variable
.
value
,
_destroy:
'true'
}],
value:
variable
.
value
,
protected:
variable
.
protected?
.
to_s
,
_destroy:
'true'
}],
format: :json
end
...
...
spec/controllers/projects/variables_controller_spec.rb
View file @
2592aec9
...
...
@@ -20,8 +20,11 @@ describe Projects::VariablesController do
subject
do
post
:save_multiple
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
},
{
key:
'..?'
,
value:
'dummy_value'
}],
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
,
protected:
variable
.
protected?
.
to_s
},
{
key:
'..?'
,
value:
'dummy_value'
,
protected:
'false'
}],
format: :json
end
...
...
@@ -44,8 +47,11 @@ describe Projects::VariablesController do
subject
do
post
:save_multiple
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
},
{
key:
'new_key'
,
value:
'dummy_value'
}],
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
'other_value'
,
protected:
variable
.
protected?
.
to_s
},
{
key:
'new_key'
,
value:
'dummy_value'
,
protected:
'false'
}],
format: :json
end
...
...
@@ -69,7 +75,9 @@ describe Projects::VariablesController do
post
:save_multiple
,
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
variables_attributes:
[{
id:
variable
.
id
,
key:
variable
.
key
,
value:
variable
.
value
,
_destroy:
'true'
}],
value:
variable
.
value
,
protected:
variable
.
protected?
.
to_s
,
_destroy:
'true'
}],
format: :json
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