Sha256: f586316999c5a087c6bf13fa79a43ceee484661c68699e0d9c98f6f328fb81b4
Contents?: true
Size: 468 Bytes
Versions: 18
Compression:
Stored size: 468 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 Translation.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'yo') expect do Translation.create(exhibit_id: exhibit.id, key: 'abc', locale: 'fr', value: 'lo') end.to raise_error(ActiveRecord::RecordNotUnique) end end end
Version data entries
18 entries across 18 versions & 1 rubygems