Skip to content

Commit

Permalink
Test methods without #send
Browse files Browse the repository at this point in the history
They've become public now so there's no need for `#send`.
  • Loading branch information
sauloperez committed Apr 2, 2021
1 parent a51e892 commit 4ae09b0
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions spec/lib/decidim/direct_verifications/user_processor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,24 @@ module DirectVerifications

context "when add processed" do
it "has unique emails per type" do
subject.send(:add_processed, :registered, "[email protected]")
subject.send(:add_processed, :registered, "[email protected]")
subject.add_processed(:registered, "[email protected]")
subject.add_processed(:registered, "[email protected]")
expect(subject.processed[:registered].count).to eq(1)
subject.send(:add_processed, :authorized, "[email protected]")
subject.send(:add_processed, :authorized, "[email protected]")

subject.add_processed(:authorized, "[email protected]")
subject.add_processed(:authorized, "[email protected]")
expect(subject.processed[:authorized].count).to eq(1)
end
end

context "when add errors" do
it "has unique emails per type" do
subject.send(:add_error, :registered, "[email protected]")
subject.send(:add_error, :registered, "[email protected]")
subject.add_error(:registered, "[email protected]")
subject.add_error(:registered, "[email protected]")
expect(subject.errors[:registered].count).to eq(1)
subject.send(:add_error, :authorized, "[email protected]")
subject.send(:add_error, :authorized, "[email protected]")

subject.add_error(:authorized, "[email protected]")
subject.add_error(:authorized, "[email protected]")
expect(subject.errors[:authorized].count).to eq(1)
end
end
Expand Down

0 comments on commit 4ae09b0

Please sign in to comment.