From fda4d88e5aeb787c8ab0e4554dbb920f4a4c27bf Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Tue, 2 Jul 2019 16:23:21 +1200 Subject: [PATCH] Fix up locale spec --- app/views/home/index.html.haml | 2 +- config/locales/en.yml | 1 - spec/features/locale_spec.rb | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 8e9ec3a6f..180753ca5 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -12,7 +12,7 @@ .row .col-xl-8.col-md-12 %section.crops - %h2= t('home.blurb.some_of_our_crops') + %h2= t('home.crop.our_crops') .homepage-cards= render 'crops' .align-bottom %p.text-right= link_to "#{t('home.crops.view_all')} »", crops_path, class: 'btn btn-block' diff --git a/config/locales/en.yml b/config/locales/en.yml index 84fdc92a9..627762143 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -136,7 +136,6 @@ en: perks: Join now for your free garden journal, harvest predictions, forums, and more. sign_in_linktext: sign in sign_up: Sign up - some_of_our_crops: Some of our crops crops: our_crops: Some of our crops recently_added: Recently added crops diff --git a/spec/features/locale_spec.rb b/spec/features/locale_spec.rb index 863fac079..a5ab43208 100644 --- a/spec/features/locale_spec.rb +++ b/spec/features/locale_spec.rb @@ -3,8 +3,12 @@ require 'rails_helper' describe "Changing locales", js: true do after { I18n.locale = :en } + let(:member) { FactoryBot.create :member } it "Locale can be set with a query param" do + # Login then log out, to ensure we're now logged out + login_as member visit root_path + click_link 'Sign out' expect(page).to have_content("a community of food gardeners.") visit root_path(locale: 'ja') expect(page).to have_content("はガーデナーのコミュニティです。")