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
08ed58ac
Commit
08ed58ac
authored
May 30, 2016
by
Grzegorz Bizon
Committed by
Valery Sizov
Jun 02, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Rubocop offenses
parent
2585b425
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
23 deletions
+23
-23
app/workers/geo_key_refresh_worker.rb
app/workers/geo_key_refresh_worker.rb
+1
-1
spec/lib/gitlab/git_access_spec.rb
spec/lib/gitlab/git_access_spec.rb
+2
-2
spec/lib/gitlab/ldap/group_sync_spec.rb
spec/lib/gitlab/ldap/group_sync_spec.rb
+2
-2
spec/models/concerns/elastic/note_spec.rb
spec/models/concerns/elastic/note_spec.rb
+1
-1
spec/models/pages_domain_spec.rb
spec/models/pages_domain_spec.rb
+7
-7
spec/requests/api/license_spec.rb
spec/requests/api/license_spec.rb
+2
-2
spec/services/pages_service_spec.rb
spec/services/pages_service_spec.rb
+2
-2
spec/services/projects/update_pages_service_spec.rb
spec/services/projects/update_pages_service_spec.rb
+6
-6
No files found.
app/workers/geo_key_refresh_worker.rb
View file @
08ed58ac
...
...
@@ -18,7 +18,7 @@ class GeoKeyRefreshWorker
key
=
Key
.
new
(
id:
key_id
,
key:
key
)
key
.
remove_from_shell
else
fail
"Invalid action:
#{
action
}
"
raise
"Invalid action:
#{
action
}
"
end
end
end
spec/lib/gitlab/git_access_spec.rb
View file @
08ed58ac
...
...
@@ -336,7 +336,7 @@ describe Gitlab::GitAccess, lib: true do
describe
'git annex disabled'
do
before
{
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:git_annex_enabled
).
and_return
(
false
)
}
it
{
expect
(
access
.
push_access_check
(
git_annex_changes
)).
to_not
be_allowed
}
it
{
expect
(
access
.
push_access_check
(
git_annex_changes
)).
not_to
be_allowed
}
end
end
...
...
@@ -355,7 +355,7 @@ describe Gitlab::GitAccess, lib: true do
describe
'git annex disabled'
do
before
{
allow
(
Gitlab
.
config
.
gitlab_shell
).
to
receive
(
:git_annex_enabled
).
and_return
(
false
)
}
it
{
expect
(
access
.
push_access_check
(
git_annex_changes
)).
to_not
be_allowed
}
it
{
expect
(
access
.
push_access_check
(
git_annex_changes
)).
not_to
be_allowed
}
end
end
end
...
...
spec/lib/gitlab/ldap/group_sync_spec.rb
View file @
08ed58ac
...
...
@@ -298,9 +298,9 @@ describe Gitlab::LDAP::GroupSync, lib: true do
group_sync
.
sync_groups
expect
(
group1
.
members
.
pluck
(
:user_id
).
sort
).
to
eq
([
user1
.
id
,
user2
.
id
].
sort
)
expect
(
group1
.
members
.
pluck
(
:access_level
).
uniq
).
to
eq
([
Gitlab
::
Access
::
DEVELOPER
])
expect
(
group1
.
members
.
uniq
.
pluck
(
:access_level
)
).
to
eq
([
Gitlab
::
Access
::
DEVELOPER
])
expect
(
group2
.
members
.
pluck
(
:user_id
)).
to
eq
([
user2
.
id
])
expect
(
group2
.
members
.
pluck
(
:access_level
).
uniq
).
to
eq
([
Gitlab
::
Access
::
MASTER
])
expect
(
group2
.
members
.
uniq
.
pluck
(
:access_level
)
).
to
eq
([
Gitlab
::
Access
::
MASTER
])
end
end
end
...
...
spec/models/concerns/elastic/note_spec.rb
View file @
08ed58ac
...
...
@@ -44,7 +44,7 @@ describe "Note", elastic: true do
it
"does not create ElasticIndexerWorker job for award or system messages"
do
project
=
create
:empty_project
expect
(
ElasticIndexerWorker
).
to_not
receive
(
:perform_async
)
expect
(
ElasticIndexerWorker
).
not_to
receive
(
:perform_async
)
create
:note
,
:system
,
project:
project
create
:note
,
:award
,
project:
project
end
...
...
spec/models/pages_domain_spec.rb
View file @
08ed58ac
...
...
@@ -23,13 +23,13 @@ describe PagesDomain, models: true do
context
'no domain'
do
let
(
:domain
)
{
nil
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'invalid domain'
do
let
(
:domain
)
{
'0123123'
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'domain from .example.com'
do
...
...
@@ -37,7 +37,7 @@ describe PagesDomain, models: true do
before
{
allow
(
Settings
.
pages
).
to
receive
(
:host
).
and_return
(
'domain.com'
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
end
...
...
@@ -47,13 +47,13 @@ describe PagesDomain, models: true do
context
'when only certificate is specified'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_certificate
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'when only key is specified'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_key
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
context
'with matching key'
do
...
...
@@ -65,7 +65,7 @@ describe PagesDomain, models: true do
context
'for not matching key'
do
let
(
:domain
)
{
build
(
:pages_domain
,
:with_missing_chain
,
:with_key
)
}
it
{
is_expected
.
to_not
be_valid
}
it
{
is_expected
.
not_to
be_valid
}
end
end
...
...
@@ -157,6 +157,6 @@ describe PagesDomain, models: true do
subject
{
domain
.
certificate_text
}
# We test only existence of output, since the output is long
it
{
is_expected
.
to_not
be_empty
}
it
{
is_expected
.
not_to
be_empty
}
end
end
spec/requests/api/license_spec.rb
View file @
08ed58ac
...
...
@@ -16,7 +16,7 @@ describe API::API, api: true do
expect
(
Date
.
parse
(
json_response
[
'starts_at'
])).
to
eq
Date
.
today
-
1
.
month
expect
(
Date
.
parse
(
json_response
[
'expires_at'
])).
to
eq
Date
.
today
+
11
.
months
expect
(
json_response
[
'active_users'
]).
to
eq
1
expect
(
json_response
[
'licensee'
]).
to_not
be_empty
expect
(
json_response
[
'licensee'
]).
not_to
be_empty
end
it
'should deny access if not admin'
do
...
...
@@ -34,7 +34,7 @@ describe API::API, api: true do
expect
(
Date
.
parse
(
json_response
[
'starts_at'
])).
to
eq
Date
.
today
-
1
.
month
expect
(
Date
.
parse
(
json_response
[
'expires_at'
])).
to
eq
Date
.
today
+
11
.
months
expect
(
json_response
[
'active_users'
]).
to
eq
1
expect
(
json_response
[
'licensee'
]).
to_not
be_empty
expect
(
json_response
[
'licensee'
]).
not_to
be_empty
end
it
'denies access if not admin'
do
...
...
spec/services/pages_service_spec.rb
View file @
08ed58ac
...
...
@@ -26,7 +26,7 @@ describe PagesService, services: true do
before
{
build
.
status
=
status
}
it
'should not execute worker'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_async
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_async
)
service
.
execute
end
end
...
...
@@ -40,7 +40,7 @@ describe PagesService, services: true do
end
it
'should not execute worker'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_async
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_async
)
service
.
execute
end
end
...
...
spec/services/projects/update_pages_service_spec.rb
View file @
08ed58ac
...
...
@@ -34,7 +34,7 @@ describe Projects::UpdatePagesService do
it
'limits pages size'
do
stub_application_setting
(
max_pages_size:
1
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'removes pages after destroy'
do
...
...
@@ -49,29 +49,29 @@ describe Projects::UpdatePagesService do
it
'fails if sha on branch is not latest'
do
commit
.
update_attributes
(
sha:
'old_sha'
)
build
.
update_attributes
(
artifacts_file:
file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'fails for empty file fails'
do
build
.
update_attributes
(
artifacts_file:
empty_file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
end
end
it
'fails to remove project pages when no pages is deployed'
do
expect
(
PagesWorker
).
to_not
receive
(
:perform_in
)
expect
(
PagesWorker
).
not_to
receive
(
:perform_in
)
expect
(
project
.
pages_deployed?
).
to
be_falsey
project
.
destroy
end
it
'fails if no artifacts'
do
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
it
'fails for invalid archive'
do
build
.
update_attributes
(
artifacts_file:
invalid_file
)
expect
(
execute
).
to_not
eq
(
:success
)
expect
(
execute
).
not_to
eq
(
:success
)
end
def
execute
...
...
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