Sha256: 2898d4ee18aac5a9d13d96d6a6cad3c477f9c203e5d5729c539534f8397ca790
Contents?: true
Size: 477 Bytes
Versions: 21
Compression:
Stored size: 477 Bytes
Contents
# frozen_string_literal: true describe Translation, type: :model do let(:exhibit) { FactoryBot.create(:exhibit) } describe 'is unique by key, locale, and exhibit' do it 'fails validation' do described_class.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'yo') expect do described_class.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'lo') end.to raise_error(ActiveRecord::RecordNotUnique) end end end
Version data entries
21 entries across 21 versions & 1 rubygems