Sha256: a071a2663c69dc4578b36bdd1a16553ed5a9148be4c178951957798b25285956
Contents?: true
Size: 1.03 KB
Versions: 11
Compression:
Stored size: 1.03 KB
Contents
require 'spec_helper' describe PostMailer do describe "#decorated_email" do let(:email_body) { Capybara.string(email.body.to_s) } let(:email) { PostMailer.decorated_email(post).deliver } let(:post) { Post.create } it "decorates" do expect(email_body).to have_content "Today" end it "can use path helpers with a model" do expect(email_body).to have_css "#path_with_model", text: "/en/posts/#{post.id}" end it "can use path helpers with an id" do expect(email_body).to have_css "#path_with_id", text: "/en/posts/#{post.id}" end it "can use url helpers with a model" do expect(email_body).to have_css "#url_with_model", text: "http://www.example.com:12345/en/posts/#{post.id}" end it "can use url helpers with an id" do expect(email_body).to have_css "#url_with_id", text: "http://www.example.com:12345/en/posts/#{post.id}" end it "uses the correct view context controller" do expect(email_body).to have_css "#controller", text: "PostMailer" end end end
Version data entries
11 entries across 11 versions & 4 rubygems