discourse/spec/models/post_detail_spec.rb

10 lines
274 B
Ruby

# frozen_string_literal: true
describe PostDetail do
it { is_expected.to belong_to :post }
it { is_expected.to validate_presence_of :key }
it { is_expected.to validate_presence_of :value }
it { is_expected.to validate_uniqueness_of(:key).scoped_to(:post_id) }
end