Sha256: 40e4bd45197ad47e4868706fbd61f13f6923b1b8f7f1ff8b47f8b91296d85fa8
Contents?: true
Size: 1.11 KB
Versions: 5
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true require "spec_helper" module SocialNetworking module Serializers RSpec.describe OnTheMindStatementSerializer do let(:participant) { instance_double(Participant, is_admin: true) } let(:on_the_mind) do instance_double( OnTheMindStatement, id: 1, created_at: Time.zone.now, participant_id: 1, description: "", comments: [], likes: [] ) end let(:serialized_comment) do OnTheMindStatementSerializer .new(on_the_mind) .to_serialized end describe ".to_serialized" do it "includes necessary properties" do allow(on_the_mind).to receive(:participant) { participant } expect(serialized_comment) .to include( :className, :id, :createdAt, :createdAtRaw, :participantId, :isAdmin, :summary, :description, :comments, :likes ) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems