diff options
author | Guilherme Garnier <guilherme.garnier@gmail.com> | 2015-10-03 01:48:54 -0500 |
---|---|---|
committer | Guilherme Garnier <guilherme.garnier@gmail.com> | 2015-10-03 01:48:54 -0500 |
commit | 848d7b2a2be28982d0f164d4e3a966c300e7c322 (patch) | |
tree | 866d41626402ec497a74441a74731d3836057244 /spec/models/hooks | |
parent | 59d0263bc86962737def7d2174e302a312d96574 (diff) | |
download | gitlab-ce-848d7b2a2be28982d0f164d4e3a966c300e7c322.tar.gz |
Fix rubocop warnings in spec/models
Diffstat (limited to 'spec/models/hooks')
-rw-r--r-- | spec/models/hooks/project_hook_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/hooks/service_hook_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/hooks/web_hook_spec.rb | 2 |
3 files changed, 2 insertions, 6 deletions
diff --git a/spec/models/hooks/project_hook_spec.rb b/spec/models/hooks/project_hook_spec.rb index dae7e399cfb..a2dc66fce3e 100644 --- a/spec/models/hooks/project_hook_spec.rb +++ b/spec/models/hooks/project_hook_spec.rb @@ -22,7 +22,7 @@ describe ProjectHook do describe '.push_hooks' do it 'should return hooks for push events only' do hook = create(:project_hook, push_events: true) - hook2 = create(:project_hook, push_events: false) + create(:project_hook, push_events: false) expect(ProjectHook.push_hooks).to eq([hook]) end end @@ -30,7 +30,7 @@ describe ProjectHook do describe '.tag_push_hooks' do it 'should return hooks for tag push events only' do hook = create(:project_hook, tag_push_events: true) - hook2 = create(:project_hook, tag_push_events: false) + create(:project_hook, tag_push_events: false) expect(ProjectHook.tag_push_hooks).to eq([hook]) end end diff --git a/spec/models/hooks/service_hook_spec.rb b/spec/models/hooks/service_hook_spec.rb index 4c8b8910ae7..16641c12124 100644 --- a/spec/models/hooks/service_hook_spec.rb +++ b/spec/models/hooks/service_hook_spec.rb @@ -39,8 +39,6 @@ describe ServiceHook do end it "POSTs the data as JSON" do - json = @data.to_json - @service_hook.execute(@data) expect(WebMock).to have_requested(:post, @service_hook.url).with( headers: { 'Content-Type'=>'application/json', 'X-Gitlab-Event'=>'Service Hook' } diff --git a/spec/models/hooks/web_hook_spec.rb b/spec/models/hooks/web_hook_spec.rb index 23f30881d99..2fdc49f02ee 100644 --- a/spec/models/hooks/web_hook_spec.rb +++ b/spec/models/hooks/web_hook_spec.rb @@ -60,8 +60,6 @@ describe ProjectHook do end it "POSTs the data as JSON" do - json = @data.to_json - @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' } |