gitlab-org--gitlab-foss/spec/models/concerns/triggerable_hooks_spec.rb

18 lines
412 B
Ruby
Raw Normal View History

2017-12-04 10:18:54 +00:00
require 'rails_helper'
RSpec.describe TriggerableHooks do
before do
class TestableHook < WebHook
include TriggerableHooks
triggerable_hooks only: [:push_hooks]
end
end
describe 'scopes' do
it 'defines a scope for each of the requested triggers' do
expect(TestableHook).to respond_to :push_hooks
expect(TestableHook).not_to respond_to :tag_push_hooks
end
end
end