Sha256: 5483bfda7341294e0b5a9a298198f09c7f2618e4dafe102e773fd45328c471c8
Contents?: true
Size: 610 Bytes
Versions: 19
Compression:
Stored size: 610 Bytes
Contents
require 'spec_helper' module OpenStax::Accounts describe Group do context 'validation' do it 'requires a unique openstax_uid' do group = FactoryGirl.build(:openstax_accounts_group, openstax_uid: nil) expect(group).not_to be_valid expect(group.errors[:openstax_uid]).to eq(['can\'t be blank']) group.openstax_uid = 1 group.save! group_2 = FactoryGirl.build(:openstax_accounts_group, openstax_uid: 1) expect(group_2).not_to be_valid expect(group_2.errors[:openstax_uid]).to eq(['has already been taken']) end end end end
Version data entries
19 entries across 19 versions & 1 rubygems