summaryrefslogtreecommitdiff
path: root/spec/models/hooks
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-25 19:09:00 +0200
committerRémy Coutable <remy@rymai.me>2017-07-27 14:31:53 +0200
commitcddc5cacfb833fbd188d2f5982381f66dd3eee3b (patch)
treede3e7bda37c8b7f0eb5586695d6d871484dc44e2 /spec/models/hooks
parentddccd24c1388dadc057ac3c4c0a49f3fea847292 (diff)
downloadgitlab-ce-cddc5cacfb833fbd188d2f5982381f66dd3eee3b.tar.gz
Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/models/hooks')
-rw-r--r--spec/models/hooks/project_hook_spec.rb4
-rw-r--r--spec/models/hooks/system_hook_spec.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/models/hooks/project_hook_spec.rb b/spec/models/hooks/project_hook_spec.rb
index c9b948fb747..5dd31b1b5de 100644
--- a/spec/models/hooks/project_hook_spec.rb
+++ b/spec/models/hooks/project_hook_spec.rb
@@ -13,7 +13,7 @@ describe ProjectHook do
it 'returns hooks for push events only' do
hook = create(:project_hook, push_events: true)
create(:project_hook, push_events: false)
- expect(ProjectHook.push_hooks).to eq([hook])
+ expect(described_class.push_hooks).to eq([hook])
end
end
@@ -21,7 +21,7 @@ describe ProjectHook do
it 'returns hooks for tag push events only' do
hook = create(:project_hook, tag_push_events: true)
create(:project_hook, tag_push_events: false)
- expect(ProjectHook.tag_push_hooks).to eq([hook])
+ expect(described_class.tag_push_hooks).to eq([hook])
end
end
end
diff --git a/spec/models/hooks/system_hook_spec.rb b/spec/models/hooks/system_hook_spec.rb
index 812dcb437f5..eadc232a989 100644
--- a/spec/models/hooks/system_hook_spec.rb
+++ b/spec/models/hooks/system_hook_spec.rb
@@ -122,7 +122,7 @@ describe SystemHook do
it 'returns hooks for repository update events only' do
hook = create(:system_hook, repository_update_events: true)
create(:system_hook, repository_update_events: false)
- expect(SystemHook.repository_update_hooks).to eq([hook])
+ expect(described_class.repository_update_hooks).to eq([hook])
end
end