Sha256: 9e91aff4501a6ba293f768431af6f7c404af0b13aad7162b4ee511e542a3b95f

Contents?: true

Size: 940 Bytes

Versions: 11

Compression:

Stored size: 940 Bytes

Contents

require "spec_helper"

module SocialNetworking
  RSpec.describe "social_networking/coach/patient_dashboards"\
                 "/tables/_likes.html.erb",
                 type: :view do
    describe "Shared items are liked" do
      let(:like) { instance_double(Like, created_at: Time.zone.now) }
      let(:membership) { double(Membership) }

      describe "Likes exist" do
        before do
          expect(membership)
            .to receive(:likes) { [like]  }
          expect(view)
            .to receive_messages(
              comment_item_description: "bar",
              week_in_study: 1)
        end

        it "displays correct formatted date time" do
          render partial: "social_networking/coach/patient_dashboards"\
                 "/tables/likes",
                 locals: { membership: membership }

          expect(rendered).to have_text like.created_at.to_s(:standard)
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
social_networking-0.11.8 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.7 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.6 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.5 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.4 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.3 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.2 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.1 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.11.0 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.10.0 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.9.3 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb