mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 12:19:52 +01:00
Reload target before checking smile count
This commit is contained in:
parent
4458aba37f
commit
d36fbf85f4
2 changed files with 2 additions and 2 deletions
|
@ -5,7 +5,7 @@ require "rails_helper"
|
|||
describe UseCase::Reaction::Create do
|
||||
shared_examples_for "valid target type" do
|
||||
it "creates a reaction" do
|
||||
expect { subject }.to change { target.smile_count }.by(1)
|
||||
expect { subject }.to change { target.reload.smile_count }.by(1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ describe UseCase::Reaction::Destroy do
|
|||
end
|
||||
|
||||
it "destroys a reaction" do
|
||||
expect { subject }.to change { target.smile_count }.by(-1)
|
||||
expect { subject }.to change { target.reload.smile_count }.by(-1)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue