Feature: Support account/inbox specific webhooks (#562)
This commit is contained in:
@@ -23,7 +23,7 @@ RSpec.describe Inbox do
|
||||
it { is_expected.to have_many(:conversations).dependent(:destroy) }
|
||||
|
||||
it { is_expected.to have_many(:messages).through(:conversations) }
|
||||
it { is_expected.to have_one(:webhook) }
|
||||
it { is_expected.to have_many(:webhooks).dependent(:destroy) }
|
||||
end
|
||||
|
||||
describe '#add_member' do
|
||||
|
||||
@@ -3,11 +3,9 @@ require 'rails_helper'
|
||||
RSpec.describe Webhook, type: :model do
|
||||
describe 'validations' do
|
||||
it { is_expected.to validate_presence_of(:account_id) }
|
||||
it { is_expected.to validate_presence_of(:inbox_id) }
|
||||
end
|
||||
|
||||
describe 'associations' do
|
||||
it { is_expected.to belong_to(:account) }
|
||||
it { is_expected.to belong_to(:inbox) }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user