Sha256: 2ebcd79eb0ad3ee60e45317ea9658b4673ad5034137051aeec6844fc12b0a9da

Contents?: true

Size: 635 Bytes

Versions: 6

Compression:

Stored size: 635 Bytes

Contents

require 'spec_helper'

describe "setting locale", type: :feature do
  stub_authorization!

  before do
    I18n.locale = I18n.default_locale
    I18n.backend.store_translations(:fr,
      date: {
        month_names: [],
      },
      spree: {
        admin: {
          tab: { orders: "Ordres" }
        },
        listing_orders: "Ordres",
      })
    Spree::Backend::Config[:locale] = "fr"
  end

  after do
    I18n.locale = I18n.default_locale
    Spree::Backend::Config[:locale] = "en"
  end

  it "should be in french" do
    visit spree.admin_path
    click_link "Ordres"
    expect(page).to have_content("Ordres")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
spree_backend-3.3.0.rc1 spec/features/admin/locale_spec.rb
spree_backend-3.2.1 spec/features/admin/locale_spec.rb
spree_backend-3.2.0 spec/features/admin/locale_spec.rb
spree_backend-3.2.0.rc3 spec/features/admin/locale_spec.rb
spree_backend-3.2.0.rc2 spec/features/admin/locale_spec.rb
spree_backend-3.2.0.rc1 spec/features/admin/locale_spec.rb