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

Version Path
blacklight-spotlight-3.0.0.alpha.2 spec/models/translation_spec.rb
blacklight-spotlight-3.0.0.alpha.1 spec/models/translation_spec.rb
blacklight-spotlight-2.13.0 spec/models/translation_spec.rb
blacklight-spotlight-2.12.1 spec/models/translation_spec.rb
blacklight-spotlight-2.12.0 spec/models/translation_spec.rb
blacklight-spotlight-2.11.0 spec/models/translation_spec.rb
blacklight-spotlight-2.10.0 spec/models/translation_spec.rb
blacklight-spotlight-2.9.0 spec/models/translation_spec.rb
blacklight-spotlight-2.8.0 spec/models/translation_spec.rb
blacklight-spotlight-2.7.2 spec/models/translation_spec.rb
blacklight-spotlight-2.7.1 spec/models/translation_spec.rb
blacklight-spotlight-2.7.0 spec/models/translation_spec.rb
blacklight-spotlight-2.6.1.1 spec/models/translation_spec.rb
blacklight-spotlight-2.6.1 spec/models/translation_spec.rb
blacklight-spotlight-2.6.0 spec/models/translation_spec.rb
blacklight-spotlight-2.5.2 spec/models/translation_spec.rb
blacklight-spotlight-2.5.1 spec/models/translation_spec.rb
blacklight-spotlight-2.5.0 spec/models/translation_spec.rb