30 lines
692 B
Ruby
Executable File
30 lines
692 B
Ruby
Executable File
# == Schema Information
|
|
#
|
|
# Table name: webhooks
|
|
#
|
|
# id :bigint not null, primary key
|
|
# name :string
|
|
# subscriptions :jsonb
|
|
# url :string
|
|
# webhook_type :integer default("account_type")
|
|
# created_at :datetime not null
|
|
# updated_at :datetime not null
|
|
# account_id :integer
|
|
# inbox_id :integer
|
|
#
|
|
# Indexes
|
|
#
|
|
# index_webhooks_on_account_id_and_url (account_id,url) UNIQUE
|
|
#
|
|
require 'rails_helper'
|
|
|
|
RSpec.describe Webhook do
|
|
describe 'validations' do
|
|
it { is_expected.to validate_presence_of(:account_id) }
|
|
end
|
|
|
|
describe 'associations' do
|
|
it { is_expected.to belong_to(:account) }
|
|
end
|
|
end
|