Sha256: 20e2cb70d4eee356d16c949dad1de305abc7e7b52ac2d462469c70b2b6218afc

Contents?: true

Size: 437 Bytes

Versions: 18

Compression:

Stored size: 437 Bytes

Contents

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

Version Path
blacklight-spotlight-2.4.1 spec/models/translation_spec.rb
blacklight-spotlight-2.4.0 spec/models/translation_spec.rb
blacklight-spotlight-2.3.3 spec/models/translation_spec.rb
blacklight-spotlight-2.3.2 spec/models/translation_spec.rb
blacklight-spotlight-2.3.1 spec/models/translation_spec.rb
blacklight-spotlight-2.3.0 spec/models/translation_spec.rb
blacklight-spotlight-2.2.1 spec/models/translation_spec.rb
blacklight-spotlight-2.2.0 spec/models/translation_spec.rb
blacklight-spotlight-2.1.0 spec/models/translation_spec.rb
blacklight-spotlight-2.0.2 spec/models/translation_spec.rb
blacklight-spotlight-2.0.1 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc6 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc5 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc4 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc3 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc2 spec/models/translation_spec.rb
blacklight-spotlight-2.0.0.rc1 spec/models/translation_spec.rb