Replace FactoryGirl with Fabricate for federation factories

This commit is contained in:
Benjamin Neff 2017-04-25 01:10:03 +02:00
parent d79c2e511b
commit 78c7156e72
No known key found for this signature in database
GPG key ID: 971464C3F1A90194
10 changed files with 52 additions and 58 deletions

View file

@ -10,8 +10,7 @@ def r_str
SecureRandom.hex(3) SecureRandom.hex(3)
end end
require "diaspora_federation/test" require "diaspora_federation/test/factories"
DiasporaFederation::Test::Factories.federation_factories
FactoryGirl.define do FactoryGirl.define do
factory :profile do factory :profile do

View file

@ -203,7 +203,7 @@ describe "diaspora federation callbacks" do
it "returns nil for an unknown id" do it "returns nil for an unknown id" do
expect( expect(
DiasporaFederation.callbacks.trigger(:fetch_private_key, FactoryGirl.generate(:diaspora_id)) DiasporaFederation.callbacks.trigger(:fetch_private_key, Fabricate.sequence(:diaspora_id))
).to be_nil ).to be_nil
end end
end end
@ -225,7 +225,7 @@ describe "diaspora federation callbacks" do
end end
it "returns nil for an unknown person" do it "returns nil for an unknown person" do
diaspora_id = FactoryGirl.generate(:diaspora_id) diaspora_id = Fabricate.sequence(:diaspora_id)
expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id) expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id)
.and_raise(DiasporaFederation::Discovery::DiscoveryError) .and_raise(DiasporaFederation::Discovery::DiscoveryError)
@ -295,7 +295,7 @@ describe "diaspora federation callbacks" do
it "returns nil for a non-existing guid" do it "returns nil for a non-existing guid" do
expect( expect(
DiasporaFederation.callbacks.trigger(:fetch_related_entity, "Post", FactoryGirl.generate(:guid)) DiasporaFederation.callbacks.trigger(:fetch_related_entity, "Post", Fabricate.sequence(:guid))
).to be_nil ).to be_nil
end end
end end
@ -337,7 +337,7 @@ describe "diaspora federation callbacks" do
describe ":receive_entity" do describe ":receive_entity" do
it "receives an AccountDeletion" do it "receives an AccountDeletion" do
account_deletion = FactoryGirl.build(:account_deletion_entity, author: remote_person.diaspora_handle) account_deletion = Fabricate(:account_deletion_entity, author: remote_person.diaspora_handle)
expect(Diaspora::Federation::Receive).to receive(:account_deletion).with(account_deletion) expect(Diaspora::Federation::Receive).to receive(:account_deletion).with(account_deletion)
expect(Workers::ReceiveLocal).not_to receive(:perform_async) expect(Workers::ReceiveLocal).not_to receive(:perform_async)
@ -346,7 +346,7 @@ describe "diaspora federation callbacks" do
end end
it "receives a Retraction" do it "receives a Retraction" do
retraction = FactoryGirl.build(:retraction_entity, author: remote_person.diaspora_handle) retraction = Fabricate(:retraction_entity, author: remote_person.diaspora_handle)
expect(Diaspora::Federation::Receive).to receive(:retraction).with(retraction, 42) expect(Diaspora::Federation::Receive).to receive(:retraction).with(retraction, 42)
expect(Workers::ReceiveLocal).not_to receive(:perform_async) expect(Workers::ReceiveLocal).not_to receive(:perform_async)
@ -355,7 +355,7 @@ describe "diaspora federation callbacks" do
end end
it "receives a entity" do it "receives a entity" do
received = FactoryGirl.build(:status_message_entity, author: remote_person.diaspora_handle) received = Fabricate(:status_message_entity, author: remote_person.diaspora_handle)
persisted = FactoryGirl.create(:status_message) persisted = FactoryGirl.create(:status_message)
expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(persisted) expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(persisted)
@ -365,7 +365,7 @@ describe "diaspora federation callbacks" do
end end
it "calls schedule_check_if_needed on the senders pod" do it "calls schedule_check_if_needed on the senders pod" do
received = FactoryGirl.build(:status_message_entity, author: remote_person.diaspora_handle) received = Fabricate(:status_message_entity, author: remote_person.diaspora_handle)
persisted = FactoryGirl.create(:status_message) persisted = FactoryGirl.create(:status_message)
expect(Person).to receive(:by_account_identifier).with(received.author).and_return(remote_person) expect(Person).to receive(:by_account_identifier).with(received.author).and_return(remote_person)
@ -377,7 +377,7 @@ describe "diaspora federation callbacks" do
end end
it "receives a entity for a recipient" do it "receives a entity for a recipient" do
received = FactoryGirl.build(:status_message_entity, author: remote_person.diaspora_handle) received = Fabricate(:status_message_entity, author: remote_person.diaspora_handle)
persisted = FactoryGirl.create(:status_message) persisted = FactoryGirl.create(:status_message)
expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(persisted) expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(persisted)
@ -387,7 +387,7 @@ describe "diaspora federation callbacks" do
end end
it "does not trigger a ReceiveLocal job if Receive.perform returned nil" do it "does not trigger a ReceiveLocal job if Receive.perform returned nil" do
received = FactoryGirl.build(:status_message_entity, author: remote_person.diaspora_handle) received = Fabricate(:status_message_entity, author: remote_person.diaspora_handle)
expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(nil) expect(Diaspora::Federation::Receive).to receive(:perform).with(received).and_return(nil)
expect(Workers::ReceiveLocal).not_to receive(:perform_async) expect(Workers::ReceiveLocal).not_to receive(:perform_async)
@ -460,7 +460,7 @@ describe "diaspora federation callbacks" do
end end
it "forwards the DiscoveryError" do it "forwards the DiscoveryError" do
diaspora_id = FactoryGirl.generate(:diaspora_id) diaspora_id = Fabricate.sequence(:diaspora_id)
expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id) expect(Person).to receive(:find_or_fetch_by_identifier).with(diaspora_id)
.and_raise(DiasporaFederation::Discovery::DiscoveryError) .and_raise(DiasporaFederation::Discovery::DiscoveryError)

View file

@ -52,7 +52,7 @@ module HelperMethods
end end
def build_relayable_federation_entity(type, data={}, additional_xml_elements={}) def build_relayable_federation_entity(type, data={}, additional_xml_elements={})
attributes = FactoryGirl.attributes_for("#{type}_entity".to_sym, data) attributes = Fabricate.attributes_for("#{type}_entity".to_sym, data)
entity_class = "DiasporaFederation::Entities::#{type.capitalize}".constantize entity_class = "DiasporaFederation::Entities::#{type.capitalize}".constantize
signable_fields = attributes.keys - [:author_signature] signable_fields = attributes.keys - [:author_signature]

View file

@ -36,7 +36,7 @@ def create_relayable_entity(entity_name, parent, diaspora_id)
).at_least(1).times.and_return(nil) if parent == local_parent ).at_least(1).times.and_return(nil) if parent == local_parent
parent_guid = parent.guid parent_guid = parent.guid
FactoryGirl.build( Fabricate(
entity_name, entity_name,
conversation_guid: parent_guid, conversation_guid: parent_guid,
parent_guid: parent_guid, parent_guid: parent_guid,

View file

@ -21,7 +21,7 @@ describe "Receive federation messages feature" do
end end
it "rejects account deletion with wrong diaspora_id" do it "rejects account deletion with wrong diaspora_id" do
delete_id = FactoryGirl.generate(:diaspora_id) delete_id = Fabricate.sequence(:diaspora_id)
post_message(generate_xml(DiasporaFederation::Entities::AccountDeletion.new(diaspora_id: delete_id), sender)) post_message(generate_xml(DiasporaFederation::Entities::AccountDeletion.new(diaspora_id: delete_id), sender))
expect(AccountDeletion.exists?(diaspora_handle: delete_id)).to be_falsey expect(AccountDeletion.exists?(diaspora_handle: delete_id)).to be_falsey
@ -31,7 +31,7 @@ describe "Receive federation messages feature" do
context "reshare" do context "reshare" do
it "reshare of public post passes" do it "reshare of public post passes" do
post = FactoryGirl.create(:status_message, author: alice.person, public: true) post = FactoryGirl.create(:status_message, author: alice.person, public: true)
reshare = FactoryGirl.build( reshare = Fabricate(
:reshare_entity, root_author: alice.diaspora_handle, root_guid: post.guid, author: sender_id) :reshare_entity, root_author: alice.diaspora_handle, root_guid: post.guid, author: sender_id)
expect(Participation::Generator).to receive(:new).with( expect(Participation::Generator).to receive(:new).with(
@ -46,7 +46,7 @@ describe "Receive federation messages feature" do
it "reshare of private post fails" do it "reshare of private post fails" do
post = FactoryGirl.create(:status_message, author: alice.person, public: false) post = FactoryGirl.create(:status_message, author: alice.person, public: false)
reshare = FactoryGirl.build( reshare = Fabricate(
:reshare_entity, root_author: alice.diaspora_handle, root_guid: post.guid, author: sender_id) :reshare_entity, root_author: alice.diaspora_handle, root_guid: post.guid, author: sender_id)
expect { expect {
post_message(generate_xml(reshare, sender)) post_message(generate_xml(reshare, sender))
@ -74,7 +74,7 @@ describe "Receive federation messages feature" do
let(:recipient) { alice } let(:recipient) { alice }
it "treats sharing request recive correctly" do it "treats sharing request recive correctly" do
entity = FactoryGirl.build(:request_entity, author: sender_id, recipient: alice.diaspora_handle) entity = Fabricate(:request_entity, author: sender_id, recipient: alice.diaspora_handle)
expect(Workers::ReceiveLocal).to receive(:perform_async).and_call_original expect(Workers::ReceiveLocal).to receive(:perform_async).and_call_original
@ -105,7 +105,7 @@ describe "Receive federation messages feature" do
it_behaves_like "messages which can't be send without sharing" it_behaves_like "messages which can't be send without sharing"
it "treats profile receive correctly" do it "treats profile receive correctly" do
entity = FactoryGirl.build(:profile_entity, author: sender_id) entity = Fabricate(:profile_entity, author: sender_id)
post_message(generate_xml(entity, sender, alice), alice) post_message(generate_xml(entity, sender, alice), alice)
received_profile = sender.profile.reload received_profile = sender.profile.reload
@ -115,7 +115,7 @@ describe "Receive federation messages feature" do
end end
it "receives conversation correctly" do it "receives conversation correctly" do
entity = FactoryGirl.build( entity = Fabricate(
:conversation_entity, :conversation_entity,
author: sender_id, author: sender_id,
participants: "#{sender_id};#{alice.diaspora_handle}" participants: "#{sender_id};#{alice.diaspora_handle}"

View file

@ -1,5 +1,5 @@
def retraction_entity(entity_name, target_object, sender) def retraction_entity(entity_name, target_object, sender)
FactoryGirl.build( Fabricate(
entity_name, entity_name,
author: sender.diaspora_handle, author: sender.diaspora_handle,
target_guid: target_object.guid, target_guid: target_object.guid,

View file

@ -4,7 +4,7 @@ shared_examples_for "messages which are indifferent about sharing fact" do
let(:public) { recipient.nil? } let(:public) { recipient.nil? }
it "treats status message receive correctly" do it "treats status message receive correctly" do
entity = FactoryGirl.build(:status_message_entity, author: sender_id, public: public) entity = Fabricate(:status_message_entity, author: sender_id, public: public)
post_message(generate_xml(entity, sender, recipient), recipient) post_message(generate_xml(entity, sender, recipient), recipient)
@ -13,7 +13,7 @@ shared_examples_for "messages which are indifferent about sharing fact" do
it "doesn't accept status message with wrong signature" do it "doesn't accept status message with wrong signature" do
allow(sender).to receive(:encryption_key).and_return(OpenSSL::PKey::RSA.new(1024)) allow(sender).to receive(:encryption_key).and_return(OpenSSL::PKey::RSA.new(1024))
entity = FactoryGirl.build(:status_message_entity, author: sender_id, public: public) entity = Fabricate(:status_message_entity, author: sender_id, public: public)
post_message(generate_xml(entity, sender, recipient), recipient) post_message(generate_xml(entity, sender, recipient), recipient)

View file

@ -73,7 +73,7 @@ module MentioningSpecHelpers
end end
def receive_status_message_via_federation(text, *recipients) def receive_status_message_via_federation(text, *recipients)
entity = FactoryGirl.build( entity = Fabricate(
:status_message_entity, :status_message_entity,
author: remote_raphael.diaspora_handle, author: remote_raphael.diaspora_handle,
text: text, text: text,

View file

@ -3,7 +3,7 @@ describe Diaspora::Federation::Receive do
let(:post) { FactoryGirl.create(:status_message, text: "hello", public: true, author: alice.person) } let(:post) { FactoryGirl.create(:status_message, text: "hello", public: true, author: alice.person) }
describe ".account_deletion" do describe ".account_deletion" do
let(:account_deletion_entity) { FactoryGirl.build(:account_deletion_entity, author: sender.diaspora_handle) } let(:account_deletion_entity) { Fabricate(:account_deletion_entity, author: sender.diaspora_handle) }
it "saves the account deletion" do it "saves the account deletion" do
Diaspora::Federation::Receive.account_deletion(account_deletion_entity) Diaspora::Federation::Receive.account_deletion(account_deletion_entity)
@ -66,7 +66,7 @@ describe Diaspora::Federation::Receive do
describe ".contact" do describe ".contact" do
let(:contact_entity) { let(:contact_entity) {
FactoryGirl.build(:contact_entity, author: sender.diaspora_handle, recipient: alice.diaspora_handle) Fabricate(:contact_entity, author: sender.diaspora_handle, recipient: alice.diaspora_handle)
} }
it "creates the contact if it doesn't exist" do it "creates the contact if it doesn't exist" do
@ -99,7 +99,7 @@ describe Diaspora::Federation::Receive do
context "sharing=false" do context "sharing=false" do
let(:unshare_contact_entity) { let(:unshare_contact_entity) {
FactoryGirl.build( Fabricate(
:contact_entity, :contact_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
recipient: alice.diaspora_handle, recipient: alice.diaspora_handle,
@ -128,9 +128,9 @@ describe Diaspora::Federation::Receive do
end end
describe ".conversation" do describe ".conversation" do
let(:conv_guid) { FactoryGirl.generate(:guid) } let(:conv_guid) { Fabricate.sequence(:guid) }
let(:message_entity) { let(:message_entity) {
FactoryGirl.build( Fabricate(
:message_entity, :message_entity,
author: alice.diaspora_handle, author: alice.diaspora_handle,
parent_guid: conv_guid, parent_guid: conv_guid,
@ -138,7 +138,7 @@ describe Diaspora::Federation::Receive do
) )
} }
let(:conversation_entity) { let(:conversation_entity) {
FactoryGirl.build( Fabricate(
:conversation_entity, :conversation_entity,
guid: conv_guid, guid: conv_guid,
author: alice.diaspora_handle, author: alice.diaspora_handle,
@ -184,7 +184,7 @@ describe Diaspora::Federation::Receive do
describe ".like" do describe ".like" do
let(:like_data) { let(:like_data) {
FactoryGirl.attributes_for( Fabricate.attributes_for(
:like_entity, :like_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
parent_guid: post.guid, parent_guid: post.guid,
@ -241,7 +241,7 @@ describe Diaspora::Federation::Receive do
end end
} }
let(:message_entity) { let(:message_entity) {
FactoryGirl.build( Fabricate(
:message_entity, :message_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
parent_guid: conversation.guid, parent_guid: conversation.guid,
@ -276,7 +276,7 @@ describe Diaspora::Federation::Receive do
describe ".participation" do describe ".participation" do
let(:participation_entity) { let(:participation_entity) {
FactoryGirl.build(:participation_entity, author: sender.diaspora_handle, parent_guid: post.guid) Fabricate(:participation_entity, author: sender.diaspora_handle, parent_guid: post.guid)
} }
it "saves the participation" do it "saves the participation" do
@ -303,7 +303,7 @@ describe Diaspora::Federation::Receive do
end end
describe ".photo" do describe ".photo" do
let(:photo_entity) { FactoryGirl.build(:photo_entity, author: sender.diaspora_handle) } let(:photo_entity) { Fabricate(:photo_entity, author: sender.diaspora_handle) }
it "saves the photo if it does not already exist" do it "saves the photo if it does not already exist" do
received = Diaspora::Federation::Receive.perform(photo_entity) received = Diaspora::Federation::Receive.perform(photo_entity)
@ -353,7 +353,7 @@ describe Diaspora::Federation::Receive do
describe ".poll_participation" do describe ".poll_participation" do
let(:post_with_poll) { FactoryGirl.create(:status_message_with_poll, author: alice.person) } let(:post_with_poll) { FactoryGirl.create(:status_message_with_poll, author: alice.person) }
let(:poll_participation_data) { let(:poll_participation_data) {
FactoryGirl.attributes_for( Fabricate.attributes_for(
:poll_participation_entity, :poll_participation_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
parent_guid: post_with_poll.poll.guid, parent_guid: post_with_poll.poll.guid,
@ -406,7 +406,7 @@ describe Diaspora::Federation::Receive do
end end
describe ".profile" do describe ".profile" do
let(:profile_entity) { FactoryGirl.build(:profile_entity, author: sender.diaspora_handle) } let(:profile_entity) { Fabricate(:profile_entity, author: sender.diaspora_handle) }
it "updates the profile of the person" do it "updates the profile of the person" do
received = Diaspora::Federation::Receive.perform(profile_entity) received = Diaspora::Federation::Receive.perform(profile_entity)
@ -426,7 +426,7 @@ describe Diaspora::Federation::Receive do
end end
describe ".reshare" do describe ".reshare" do
let(:reshare_entity) { FactoryGirl.build(:reshare_entity, author: sender.diaspora_handle, root_guid: post.guid) } let(:reshare_entity) { Fabricate(:reshare_entity, author: sender.diaspora_handle, root_guid: post.guid) }
it "saves the reshare" do it "saves the reshare" do
received = Diaspora::Federation::Receive.perform(reshare_entity) received = Diaspora::Federation::Receive.perform(reshare_entity)
@ -456,7 +456,7 @@ describe Diaspora::Federation::Receive do
it "destroys the post" do it "destroys the post" do
remote_post = FactoryGirl.create(:status_message, author: sender, public: true) remote_post = FactoryGirl.create(:status_message, author: sender, public: true)
retraction = FactoryGirl.build( retraction = Fabricate(
:retraction_entity, :retraction_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
target_guid: remote_post.guid, target_guid: remote_post.guid,
@ -471,12 +471,7 @@ describe Diaspora::Federation::Receive do
end end
it "raises when the post does not exist" do it "raises when the post does not exist" do
retraction = FactoryGirl.build( retraction = Fabricate(:retraction_entity, author: sender.diaspora_handle, target_type: "Post")
:retraction_entity,
author: sender.diaspora_handle,
target_guid: FactoryGirl.generate(:guid),
target_type: "Post"
)
expect { expect {
Diaspora::Federation::Receive.retraction(retraction, nil) Diaspora::Federation::Receive.retraction(retraction, nil)
@ -486,7 +481,7 @@ describe Diaspora::Federation::Receive do
it "disconnects on Person-Retraction" do it "disconnects on Person-Retraction" do
alice.contacts.find_or_initialize_by(person_id: sender.id, receiving: true, sharing: true).save! alice.contacts.find_or_initialize_by(person_id: sender.id, receiving: true, sharing: true).save!
retraction = FactoryGirl.build( retraction = Fabricate(
:retraction_entity, :retraction_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
target_guid: sender.guid, target_guid: sender.guid,
@ -506,7 +501,7 @@ describe Diaspora::Federation::Receive do
local_post = FactoryGirl.create(:status_message, author: alice.person, public: true) local_post = FactoryGirl.create(:status_message, author: alice.person, public: true)
remote_comment = FactoryGirl.create(:comment, author: sender, post: local_post) remote_comment = FactoryGirl.create(:comment, author: sender, post: local_post)
retraction = FactoryGirl.build( retraction = Fabricate(
:retraction_entity, :retraction_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
target_guid: remote_comment.guid, target_guid: remote_comment.guid,
@ -529,7 +524,7 @@ describe Diaspora::Federation::Receive do
remote_post = FactoryGirl.create(:status_message, author: sender, public: true) remote_post = FactoryGirl.create(:status_message, author: sender, public: true)
remote_comment = FactoryGirl.create(:comment, author: sender, post: remote_post) remote_comment = FactoryGirl.create(:comment, author: sender, post: remote_post)
retraction = FactoryGirl.build( retraction = Fabricate(
:retraction_entity, :retraction_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
target_guid: remote_comment.guid, target_guid: remote_comment.guid,
@ -547,7 +542,7 @@ describe Diaspora::Federation::Receive do
describe ".status_message" do describe ".status_message" do
context "basic status message" do context "basic status message" do
let(:status_message_entity) { FactoryGirl.build(:status_message_entity, author: sender.diaspora_handle) } let(:status_message_entity) { Fabricate(:status_message_entity, author: sender.diaspora_handle) }
it "saves the status message" do it "saves the status message" do
received = Diaspora::Federation::Receive.perform(status_message_entity) received = Diaspora::Federation::Receive.perform(status_message_entity)
@ -583,7 +578,7 @@ describe Diaspora::Federation::Receive do
end end
it "finds the correct author if the author is not lowercase" do it "finds the correct author if the author is not lowercase" do
status_message_entity = FactoryGirl.build(:status_message_entity, author: sender.diaspora_handle.upcase) status_message_entity = Fabricate(:status_message_entity, author: sender.diaspora_handle.upcase)
received = Diaspora::Federation::Receive.perform(status_message_entity) received = Diaspora::Federation::Receive.perform(status_message_entity)
@ -595,9 +590,9 @@ describe Diaspora::Federation::Receive do
end end
context "with poll" do context "with poll" do
let(:poll_entity) { FactoryGirl.build(:poll_entity) } let(:poll_entity) { Fabricate(:poll_entity) }
let(:status_message_entity) { let(:status_message_entity) {
FactoryGirl.build(:status_message_entity, author: sender.diaspora_handle, poll: poll_entity) Fabricate(:status_message_entity, author: sender.diaspora_handle, poll: poll_entity)
} }
it "saves the status message" do it "saves the status message" do
@ -616,9 +611,9 @@ describe Diaspora::Federation::Receive do
end end
context "with location" do context "with location" do
let(:location_entity) { FactoryGirl.build(:location_entity) } let(:location_entity) { Fabricate(:location_entity) }
let(:status_message_entity) { let(:status_message_entity) {
FactoryGirl.build(:status_message_entity, author: sender.diaspora_handle, location: location_entity) Fabricate(:status_message_entity, author: sender.diaspora_handle, location: location_entity)
} }
it "saves the status message" do it "saves the status message" do
@ -636,15 +631,15 @@ describe Diaspora::Federation::Receive do
end end
context "with photos" do context "with photos" do
let(:status_message_guid) { FactoryGirl.generate(:guid) } let(:status_message_guid) { Fabricate.sequence(:guid) }
let(:photo1) { let(:photo1) {
FactoryGirl.build(:photo_entity, author: sender.diaspora_handle, status_message_guid: status_message_guid) Fabricate(:photo_entity, author: sender.diaspora_handle, status_message_guid: status_message_guid)
} }
let(:photo2) { let(:photo2) {
FactoryGirl.build(:photo_entity, author: sender.diaspora_handle, status_message_guid: status_message_guid) Fabricate(:photo_entity, author: sender.diaspora_handle, status_message_guid: status_message_guid)
} }
let(:status_message_entity) { let(:status_message_entity) {
FactoryGirl.build( Fabricate(
:status_message_entity, :status_message_entity,
author: sender.diaspora_handle, author: sender.diaspora_handle,
guid: status_message_guid, guid: status_message_guid,

View file

@ -4,7 +4,7 @@
describe Notifications::PrivateMessage, type: :model do describe Notifications::PrivateMessage, type: :model do
let(:conversation) { let(:conversation) {
conv_guid = FactoryGirl.generate(:guid) conv_guid = Fabricate.sequence(:guid)
Conversation.create( Conversation.create(
guid: conv_guid, guid: conv_guid,