Sha256: cffc2201aaedbf74e066e43a20846b5c75e79121f040fb034c8bf7350b506a6a
Contents?: true
Size: 978 Bytes
Versions: 3
Compression:
Stored size: 978 Bytes
Contents
require 'spec_helper' 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 expect(Pwb::Content.find_by_key('aboutUs')).to be_present end it 'creates 3 content-area-cols' do expect(Pwb::Content.where(tag: 'content-area-cols').count).to eq(3) end it 'creates 4 prop entries' do expect(Pwb::Prop.count).to eq(4) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
pwb-1.2.0 | spec/libraries/pwb/seeder_spec.rb |
pwb-1.1.1 | spec/libraries/pwb/seeder_spec.rb |
pwb-1.0.0 | spec/libraries/pwb/seeder_spec.rb |