vidpush/spec/models/videolisting_spec.rb
2014-04-09 14:37:46 -04:00

16 lines
370 B
Ruby

require 'spec_helper'
describe Videolisting, 'associations' do
let(:videolisting){ attributes_for :videolisting }
it { should belong_to(:campaign) }
it 'disallows duplicate videocode' do
one = Videolisting.new(videolisting)
one.save
two = Videolisting.new(videolisting)
two.videocode = one.videocode
expect(two.valid?).to be false
end
end