mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-15 23:56:09 +10:00
* Added a scope to the web_hooks model * Added extra checkbooks in de hooks overview window
20 lines
584 B
Ruby
20 lines
584 B
Ruby
require 'spec_helper'
|
|
|
|
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)
|
|
expect(ProjectHook.push_hooks).to eq([hook])
|
|
end
|
|
end
|
|
|
|
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)
|
|
expect(ProjectHook.tag_push_hooks).to eq([hook])
|
|
end
|
|
end
|
|
end
|