summaryrefslogtreecommitdiff
path: root/spec/models/hooks
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-06-22 14:41:00 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-06-22 14:41:00 -0400
commit94eff655693a504b8b5d10472257709d8a2b342b (patch)
tree6ac43313772ee1c1933ed5b5fa3eb59ec6d14f13 /spec/models/hooks
parent56246b70fb4fcbbb6f623ba9a38ba428a85175ef (diff)
downloadgitlab-ce-94eff655693a504b8b5d10472257709d8a2b342b.tar.gz
Fix Style/SpaceInsideHashLiteralBraces cop violations
These fixes were performed automatically by Rubocop's `-a` flag.
Diffstat (limited to 'spec/models/hooks')
-rw-r--r--spec/models/hooks/service_hook_spec.rb6
-rw-r--r--spec/models/hooks/system_hook_spec.rb20
-rw-r--r--spec/models/hooks/web_hook_spec.rb6
3 files changed, 16 insertions, 16 deletions
diff --git a/spec/models/hooks/service_hook_spec.rb b/spec/models/hooks/service_hook_spec.rb
index fb5111dd9f5..f7da4f43680 100644
--- a/spec/models/hooks/service_hook_spec.rb
+++ b/spec/models/hooks/service_hook_spec.rb
@@ -26,7 +26,7 @@ describe ServiceHook do
describe "execute" do
before(:each) do
@service_hook = create(:service_hook)
- @data = { project_id: 1, data: {}}
+ @data = { project_id: 1, data: {} }
WebMock.stub_request(:post, @service_hook.url)
end
@@ -34,7 +34,7 @@ describe ServiceHook do
it "POSTs to the web hook URL" do
@service_hook.execute(@data)
expect(WebMock).to have_requested(:post, @service_hook.url).with(
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Service Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Service Hook' }
).once
end
@@ -43,7 +43,7 @@ describe ServiceHook do
@service_hook.execute(@data)
expect(WebMock).to have_requested(:post, @service_hook.url).with(
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Service Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Service Hook' }
).once
end
diff --git a/spec/models/hooks/system_hook_spec.rb b/spec/models/hooks/system_hook_spec.rb
index edb21fc2e47..4175f9dd88f 100644
--- a/spec/models/hooks/system_hook_spec.rb
+++ b/spec/models/hooks/system_hook_spec.rb
@@ -29,7 +29,7 @@ describe SystemHook do
Projects::CreateService.new(create(:user), name: 'empty').execute
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /project_create/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -39,7 +39,7 @@ describe SystemHook do
Projects::DestroyService.new(project, user, {}).execute
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /project_destroy/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -47,7 +47,7 @@ describe SystemHook do
create(:user)
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_create/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -56,7 +56,7 @@ describe SystemHook do
user.destroy
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_destroy/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -66,7 +66,7 @@ describe SystemHook do
project.team << [user, :master]
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_add_to_team/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -77,7 +77,7 @@ describe SystemHook do
project.project_members.destroy_all
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_remove_from_team/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -85,7 +85,7 @@ describe SystemHook do
create(:group)
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /group_create/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -94,7 +94,7 @@ describe SystemHook do
group.destroy
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /group_destroy/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -104,7 +104,7 @@ describe SystemHook do
group.add_user(user, Gitlab::Access::MASTER)
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_add_to_group/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
@@ -115,7 +115,7 @@ describe SystemHook do
group.group_members.destroy_all
expect(WebMock).to have_requested(:post, @system_hook.url).with(
body: /user_remove_from_group/,
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'System Hook' }
).once
end
diff --git a/spec/models/hooks/web_hook_spec.rb b/spec/models/hooks/web_hook_spec.rb
index 4c3f0cbcbbf..70151ba2331 100644
--- a/spec/models/hooks/web_hook_spec.rb
+++ b/spec/models/hooks/web_hook_spec.rb
@@ -47,7 +47,7 @@ describe ProjectHook do
@project_hook = create(:project_hook)
@project = create(:project)
@project.hooks << [@project_hook]
- @data = { before: 'oldrev', after: 'newrev', ref: 'ref'}
+ @data = { before: 'oldrev', after: 'newrev', ref: 'ref' }
WebMock.stub_request(:post, @project_hook.url)
end
@@ -55,7 +55,7 @@ describe ProjectHook do
it "POSTs to the web hook URL" do
@project_hook.execute(@data, 'push_hooks')
expect(WebMock).to have_requested(:post, @project_hook.url).with(
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Push Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Push Hook' }
).once
end
@@ -64,7 +64,7 @@ describe ProjectHook do
@project_hook.execute(@data, 'push_hooks')
expect(WebMock).to have_requested(:post, @project_hook.url).with(
- headers: {'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Push Hook'}
+ headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Push Hook' }
).once
end