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
de893b19
Commit
de893b19
authored
Jun 28, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve small things
parent
2633a635
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
spec/models/ci/variable_spec.rb
spec/models/ci/variable_spec.rb
+1
-1
spec/models/concerns/has_variable_spec.rb
spec/models/concerns/has_variable_spec.rb
+1
-3
No files found.
spec/models/ci/variable_spec.rb
View file @
de893b19
...
@@ -3,7 +3,7 @@ require 'spec_helper'
...
@@ -3,7 +3,7 @@ require 'spec_helper'
describe
Ci
::
Variable
,
models:
true
do
describe
Ci
::
Variable
,
models:
true
do
subject
{
build
(
:ci_variable
)
}
subject
{
build
(
:ci_variable
)
}
it
{
is_expected
.
to
be_kind_of
(
HasVariable
)
}
it
{
is_expected
.
to
include_module
(
HasVariable
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:key
).
scoped_to
(
:project_id
)
}
it
{
is_expected
.
to
validate_uniqueness_of
(
:key
).
scoped_to
(
:project_id
)
}
describe
'.unprotected'
do
describe
'.unprotected'
do
...
...
spec/models/concerns/has_variable_spec.rb
View file @
de893b19
...
@@ -3,8 +3,6 @@ require 'spec_helper'
...
@@ -3,8 +3,6 @@ require 'spec_helper'
describe
HasVariable
do
describe
HasVariable
do
subject
{
build
(
:ci_variable
)
}
subject
{
build
(
:ci_variable
)
}
let
(
:secret_value
)
{
'secret'
}
it
{
is_expected
.
to
validate_presence_of
(
:key
)
}
it
{
is_expected
.
to
validate_presence_of
(
:key
)
}
it
{
is_expected
.
to
validate_length_of
(
:key
).
is_at_most
(
255
)
}
it
{
is_expected
.
to
validate_length_of
(
:key
).
is_at_most
(
255
)
}
it
{
is_expected
.
to
allow_value
(
'foo'
).
for
(
:key
)
}
it
{
is_expected
.
to
allow_value
(
'foo'
).
for
(
:key
)
}
...
@@ -13,7 +11,7 @@ describe HasVariable do
...
@@ -13,7 +11,7 @@ describe HasVariable do
describe
'#value'
do
describe
'#value'
do
before
do
before
do
subject
.
value
=
secret_value
subject
.
value
=
'secret'
end
end
it
'stores the encrypted value'
do
it
'stores the encrypted value'
do
...
...
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