Skip to content

Commit

Permalink
Reflect change in relationship building in spec
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralineAda committed Dec 3, 2024
1 parent f2eb08b commit 06488ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/response_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

allow(Persona).to receive(:find_or_create_by).and_return(persona)
allow(Persona).to receive(:find_or_initialize_by).and_return(persona)
allow(persona).to receive(:codes).and_return([])
allow(persona).to receive(:identities).and_return([])

allow(Identity).to receive(:find_or_create_by).and_return(identity)
allow(Identity).to receive(:reap_orphans)
Expand Down Expand Up @@ -43,14 +45,12 @@
it "creates identities" do
allow(Response).to receive(:find).and_return(response_1)
expect(Identity).to receive(:find_or_create_by).with(name: "not okay", context: "age").and_return(identity)
expect(IdentifiesWith).to receive(:create)
response_1.sync_to_graph
end

it "creates codes" do
allow(Response).to receive(:find).and_return(response_2)
expect(Code).to receive(:find_or_create_by).with(name: "just okay", context: "age"). and_return(code)
expect(Experiences).to receive(:create)
response_2.sync_to_graph
end

Expand Down

0 comments on commit 06488ea

Please sign in to comment.