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
7f011676
Commit
7f011676
authored
May 25, 2017
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests and rubocop offense
parent
ef10f4c5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
app/models/ci/build.rb
app/models/ci/build.rb
+1
-1
spec/features/variables_spec.rb
spec/features/variables_spec.rb
+2
-2
spec/lib/gitlab/utils_spec.rb
spec/lib/gitlab/utils_spec.rb
+5
-1
No files found.
app/models/ci/build.rb
View file @
7f011676
...
...
@@ -188,7 +188,7 @@ module Ci
variables
+=
project
.
secret_variables
variables
+=
project
.
protected_variables
if
ProtectedBranch
.
protected?
(
project
,
ref
)
||
ProtectedTag
.
protected?
(
project
,
ref
)
ProtectedTag
.
protected?
(
project
,
ref
)
variables
+=
trigger_request
.
user_variables
if
trigger_request
variables
end
...
...
spec/features/variables_spec.rb
View file @
7f011676
...
...
@@ -136,10 +136,10 @@ describe 'Project variables', js: true do
end
expect
(
page
).
to
have_content
(
'Update variable'
)
check
(
'Protected'
)
un
check
(
'Protected'
)
click_button
(
'Save variable'
)
expect
(
page
).
to
have_content
(
'Variable was successfully updated.'
)
expect
(
project
.
variables
.
first
).
not_to
be_protected
expect
(
project
.
reload
.
variables
.
first
).
not_to
be_protected
end
end
spec/lib/gitlab/utils_spec.rb
View file @
7f011676
require
'spec_helper'
describe
Gitlab
::
Utils
,
lib:
true
do
delegate
:to_boolean
,
to: :described_class
delegate
:to_boolean
,
:boolean_to_yes_no
,
to: :described_class
describe
'.to_boolean'
do
it
'accepts booleans'
do
...
...
@@ -29,7 +31,9 @@ describe Gitlab::Utils, lib: true do
expect
(
to_boolean
(
''
)).
to
be_nil
expect
(
to_boolean
(
nil
)).
to
be_nil
end
end
describe
'.boolean_to_yes_no'
do
it
'converts booleans to Yes or No'
do
expect
(
boolean_to_yes_no
(
true
)).
to
eq
(
'Yes'
)
expect
(
boolean_to_yes_no
(
false
)).
to
eq
(
'No'
)
...
...
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