spec/libraries/pwb/seeder_spec.rb in pwb-0.0.2 vs spec/libraries/pwb/seeder_spec.rb in pwb-0.1.0

- old
+ new

@@ -2,11 +2,20 @@ require 'pwb/seeder' module Pwb RSpec.describe 'Seeder' do before(:all) do + I18n::Backend::ActiveRecord::Translation.destroy_all Pwb::Seeder.seed! end + + it 'creates i18n translations' do + es_translations = I18n::Backend::ActiveRecord::Translation.where(locale: "es") + en_translations = I18n::Backend::ActiveRecord::Translation.where(locale: "en") + expect(es_translations.count).to eq(en_translations.count) + expect(es_translations.count).to be >(0) + end + it 'creates a landing page hero entry' do expect(Pwb::Content.find_by_key('landingCarousel1')).to be_present end it 'creates an about_us entry' do