Sha256: 29c24c119c8ce26f654c4838287cac4ce9eece879ba1e0463b0968cd28d56f89
Contents?: true
Size: 690 Bytes
Versions: 3
Compression:
Stored size: 690 Bytes
Contents
# frozen_string_literal: true require "spec_helper" shared_examples "author localised email" do let(:author) { create(:user, locale: locale, organization: organization) } let(:commentable_author) { create(:user, locale: locale, organization: organization) } 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
3 entries across 3 versions & 1 rubygems