Skip to content

Commit

Permalink
Rspec for service method changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie authored and JamieCleare2525 committed Jan 29, 2024
1 parent bf8bde0 commit 2d140d0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion spec/mailers/notify_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe NotifyMailer, type: :mailer do
describe "#send_organisation_invite_email" do
subject { described_class.send_organisation_invite_email(user, organisation, service, "") }
subject { described_class.send_organisation_invite_email(user, organisation, "") }

context "when the user's service is Claims" do
let(:user) { create(:claims_user, first_name: "Anne", last_name: "Wilson") }
Expand Down
8 changes: 4 additions & 4 deletions spec/services/user_invite_service_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require "rails_helper"

RSpec.describe UserInviteService do
subject { described_class.call(user, organisation, service) }
subject { described_class.call(user, organisation) }

describe "call" do
context "when the user's service is Claims" do
Expand All @@ -12,7 +12,7 @@

it "calls mailer with correct prams" do
notify_mailer = double(:notify_mailer)
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, service, "http://claims.localhost/sign-in") { notify_mailer }
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, "http://claims.localhost/sign-in") { notify_mailer }
expect(notify_mailer).to receive(:deliver_later)
subject
end
Expand All @@ -28,7 +28,7 @@

it "calls mailer with correct prams" do
notify_mailer = double(:notify_mailer)
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, service, "http://placements.localhost/sign-in") { notify_mailer }
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, "http://placements.localhost/sign-in") { notify_mailer }
expect(notify_mailer).to receive(:deliver_later)
subject
end
Expand All @@ -40,7 +40,7 @@

it "calls mailer with correct prams" do
notify_mailer = double(:notify_mailer)
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, service, "http://placements.localhost/sign-in") { notify_mailer }
expect(NotifyMailer).to receive(:send_organisation_invite_email).with(user, organisation, "http://placements.localhost/sign-in") { notify_mailer }
expect(notify_mailer).to receive(:deliver_later)
subject
end
Expand Down

0 comments on commit 2d140d0

Please sign in to comment.