my bad, forgot to add the spec file about i18n_field
did
committed May 27, 2015
commit 0de4f80c706a87797f267a2f9022b614f1978de3
Showing 1
changed file with
25 additions
and 0 deletions
spec/unit/models/i18n_field_spec.rb
+25
-0
| @@ | @@ -0,0 +1,25 @@ |
| + | 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 |