2013-10-15 10:21:30 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe PostDetail do
|
2014-12-31 09:55:03 -05:00
|
|
|
it { is_expected.to belong_to :post }
|
2013-10-15 10:21:30 -04:00
|
|
|
|
2014-12-31 09:55:03 -05:00
|
|
|
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) }
|
2013-10-15 10:21:30 -04:00
|
|
|
end
|