Sha256: b041ba061ad49e0dea9bdc913c8de764bfc6c5bd7bae9fa454c99bf02675772b

Contents?: true

Size: 973 Bytes

Versions: 5

Compression:

Stored size: 973 Bytes

Contents

# frozen_string_literal: true
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

5 entries across 5 versions & 1 rubygems

Version Path
social_networking-0.13.3 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.13.2 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.13.1 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.13.0 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb
social_networking-0.12.0 spec/views/social_networking/coach/patient_dashboards/tables/_likes.html.erb_spec.rb