Sha256: 566158c8bf1ec7bc86589c2e4db8365b891a775c8a8683f24d0608fe30b83c7c

Contents?: true

Size: 449 Bytes

Versions: 21

Compression:

Stored size: 449 Bytes

Contents

require 'spec_helper'

describe Locomotive::Steam::Models::I18nField do

  let(:name)          { 'title' }
  let(:translations)  { nil }
  let(:field)         { described_class.new(name, translations) }

  describe '#blank?' do

    subject { field.blank? }

    it { is_expected.to eq true }

    context 'with translations' do

      let(:translations) { { en: 'Hello world', fr: nil } }

      it { is_expected.to eq false }

    end

  end

end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
locomotivecms_steam-1.1.2 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.1.1 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.1.0 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.1.0.rc3 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.1.0.rc2 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.1.0.rc1 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.1 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc10 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc9 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc8 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc6 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc4 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc3 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc2 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.rc1 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.pre.beta.3 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.pre.beta.2 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.pre.beta.1 spec/unit/models/i18n_field_spec.rb
locomotivecms_steam-1.0.0.pre.alpha.3 spec/unit/models/i18n_field_spec.rb