Sha256: 86e07724b7c01a99b41e3d100df7653b1fff475179457a98a9cb7d97df288143
Contents?: true
Size: 597 Bytes
Versions: 40
Compression:
Stored size: 597 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 "when the user does not have a custom locale" 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
40 entries across 40 versions & 1 rubygems