Fix up locale spec

This commit is contained in:
Brenda Wallace
2019-07-02 16:23:21 +12:00
committed by always-be-closing[bot]
parent b56771f9b7
commit fda4d88e5a
3 changed files with 5 additions and 2 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -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("はガーデナーのコミュニティです。")