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
e62dc7a2
Commit
e62dc7a2
authored
Aug 10, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Auto-correct EE-specific RSpec/HookArgument offenses
parent
6b5d9409
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
15 deletions
+15
-15
spec/controllers/projects/mirrors_controller_spec.rb
spec/controllers/projects/mirrors_controller_spec.rb
+1
-1
spec/lib/banzai/filter/upload_link_filter_spec.rb
spec/lib/banzai/filter/upload_link_filter_spec.rb
+1
-1
spec/lib/gitlab/geo/oauth_session_spec.rb
spec/lib/gitlab/geo/oauth_session_spec.rb
+1
-1
spec/lib/gitlab/geo/update_queue_spec.rb
spec/lib/gitlab/geo/update_queue_spec.rb
+1
-1
spec/lib/gitlab/geo_spec.rb
spec/lib/gitlab/geo_spec.rb
+3
-3
spec/requests/api/geo_spec.rb
spec/requests/api/geo_spec.rb
+4
-4
spec/services/geo/enqueue_wiki_update_service_spec.rb
spec/services/geo/enqueue_wiki_update_service_spec.rb
+1
-1
spec/services/groups/destroy_service_spec.rb
spec/services/groups/destroy_service_spec.rb
+1
-1
spec/services/search/group_service_spec.rb
spec/services/search/group_service_spec.rb
+2
-2
No files found.
spec/controllers/projects/mirrors_controller_spec.rb
View file @
e62dc7a2
...
...
@@ -135,7 +135,7 @@ describe Projects::MirrorsController do
sign_in
(
project
.
owner
)
end
around
(
:each
)
do
|
example
|
around
do
|
example
|
Sidekiq
::
Testing
.
fake!
{
example
.
run
}
end
...
...
spec/lib/banzai/filter/upload_link_filter_spec.rb
View file @
e62dc7a2
...
...
@@ -91,7 +91,7 @@ describe Banzai::Filter::UploadLinkFilter do
context
'in a geo secondary node'
do
let
(
:geo_url
)
{
'http://geo.example.com'
}
before
(
:each
)
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:secondary?
)
{
true
}
allow
(
Gitlab
::
Geo
).
to
receive_message_chain
(
:primary_node
,
:url
)
{
geo_url
}
end
...
...
spec/lib/gitlab/geo/oauth_session_spec.rb
View file @
e62dc7a2
...
...
@@ -9,7 +9,7 @@ describe Gitlab::Geo::OauthSession do
let
(
:access_token
)
{
FactoryGirl
.
create
(
:doorkeeper_access_token
).
token
}
let
(
:user
)
{
FactoryGirl
.
build
(
:user
)
}
before
(
:each
)
do
before
do
allow
(
subject
).
to
receive
(
:oauth_app
)
{
oauth_app
}
allow
(
subject
).
to
receive
(
:primary_node_url
)
{
'http://localhost:3001/'
}
end
...
...
spec/lib/gitlab/geo/update_queue_spec.rb
View file @
e62dc7a2
...
...
@@ -25,7 +25,7 @@ describe Gitlab::Geo::UpdateQueue do
end
context
'when queue has elements'
do
before
(
:each
)
do
before
do
subject
.
store
(
dummy_data
)
subject
.
store
(
dummy_data2
)
end
...
...
spec/lib/gitlab/geo_spec.rb
View file @
e62dc7a2
...
...
@@ -15,7 +15,7 @@ describe Gitlab::Geo do
end
describe
'primary_node'
do
before
(
:each
)
do
before
do
primary_node
secondary_node
end
...
...
@@ -27,7 +27,7 @@ describe Gitlab::Geo do
describe
'primary?'
do
context
'when current node is a primary node'
do
before
(
:each
)
do
before
do
primary_node
end
...
...
@@ -45,7 +45,7 @@ describe Gitlab::Geo do
describe
'secondary?'
do
context
'when current node is a secondary node'
do
before
(
:each
)
do
before
do
secondary_node
allow
(
described_class
).
to
receive
(
:current_node
)
{
secondary_node
}
end
...
...
spec/requests/api/geo_spec.rb
View file @
e62dc7a2
...
...
@@ -11,7 +11,7 @@ describe API::Geo do
{
'X-Gitlab-Token'
=>
secondary_node
.
system_hook
.
token
}
end
before
(
:each
)
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:current_node
)
{
secondary_node
}
end
...
...
@@ -62,7 +62,7 @@ describe API::Geo do
}
end
before
(
:each
)
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:current_node
)
{
secondary_node
}
allow_any_instance_of
(
::
Geo
::
ScheduleRepoUpdateService
).
to
receive
(
:execute
)
allow_any_instance_of
(
::
Geo
::
ScheduleRepoFetchService
).
to
receive
(
:execute
)
...
...
@@ -339,7 +339,7 @@ describe API::Geo do
end
context
'when requesting secondary node with valid auth header'
do
before
(
:each
)
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:current_node
)
{
secondary_node
}
allow
(
request
).
to
receive
(
:requesting_node
)
{
primary_node
}
end
...
...
@@ -353,7 +353,7 @@ describe API::Geo do
end
context
'when requesting primary node with valid auth header'
do
before
(
:each
)
do
before
do
allow
(
Gitlab
::
Geo
).
to
receive
(
:current_node
)
{
primary_node
}
allow
(
request
).
to
receive
(
:requesting_node
)
{
secondary_node
}
end
...
...
spec/services/geo/enqueue_wiki_update_service_spec.rb
View file @
e62dc7a2
...
...
@@ -7,7 +7,7 @@ describe Geo::EnqueueWikiUpdateService do
let
(
:fake_id
)
{
999
}
let
(
:queue
)
{
subject
.
instance_variable_get
(
:@queue
)
}
before
(
:each
)
do
before
do
queue
.
empty!
expect
(
project
).
to
receive_message_chain
(
:wiki
,
:url_to_repo
)
{
fake_url
}
expect
(
project
).
to
receive
(
:id
)
{
fake_id
}
...
...
spec/services/groups/destroy_service_spec.rb
View file @
e62dc7a2
...
...
@@ -85,7 +85,7 @@ describe Groups::DestroyService do
context
'potential race conditions'
do
context
"when the `GroupDestroyWorker` task runs immediately"
do
around
(
:each
)
do
|
example
|
around
do
|
example
|
old_strategy
=
DatabaseCleaner
[
:active_record
,
{
connection:
ActiveRecord
::
Base
}].
strategy
DatabaseCleaner
[
:active_record
,
{
connection:
ActiveRecord
::
Base
}].
strategy
=
:deletion
begin
...
...
spec/services/search/group_service_spec.rb
View file @
e62dc7a2
...
...
@@ -39,7 +39,7 @@ describe Search::GroupService do
end
describe
'elasticsearch'
do
before
(
:each
)
do
before
do
stub_application_setting
(
elasticsearch_search:
true
,
elasticsearch_indexing:
true
)
Gitlab
::
Elastic
::
Helper
.
create_empty_index
...
...
@@ -52,7 +52,7 @@ describe Search::GroupService do
Gitlab
::
Elastic
::
Helper
.
refresh_index
end
after
(
:each
)
do
after
do
Gitlab
::
Elastic
::
Helper
.
delete_index
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