Sha256: 17f8b8ba22e863ca1cb9c3bda47c1363a9e759aa41f16e45d95fbd04c9ff2048
Contents?: true
Size: 563 Bytes
Versions: 47
Compression:
Stored size: 563 Bytes
Contents
# frozen_string_literal: true require "spec_helper" shared_examples "localised email" do let(:user) { build(:user, locale: locale) } context "when the user has a custom locale" do let(:locale) { "ca" } it "uses the user's locale" do expect(mail.subject).to eq(subject) expect(mail.body.encoded).to match(body) end end context "otherwise" do let(:locale) { nil } it "uses the default locale" do expect(mail.subject).to eq(default_subject) expect(mail.body.encoded).to match(default_body) end end end
Version data entries
47 entries across 47 versions & 2 rubygems