Sha256: a71d7e92a5960ce5abd67a227c14ab0aa3a75116a99fbaab0c9b339abdea2800
Contents?: true
Size: 1.15 KB
Versions: 5
Compression:
Stored size: 1.15 KB
Contents
# frozen_string_literal: true require "spec_helper" module SocialNetworking RSpec.describe "social_networking/coach/patient_dashboards"\ "/tables/_comments.html.erb", type: :view do describe "Shared comments" do let(:comment) do instance_double(Comment, created_at: Time.zone.now, text: "foo") end let(:membership) { instance_double(::Membership) } describe "Comments exist" do before do expect(membership) .to receive(:comments) { [comment] } expect(view) .to receive_messages(comment_item_description: "bar", week_in_study: 1) render partial: "social_networking/coach/patient_dashboards"\ "/tables/comments", locals: { membership: membership } end it "displays comment text" do expect(rendered).to have_text "foo" end it "displays correct formatted date time" do expect(rendered).to have_text comment.created_at.to_s(:standard) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems