-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Martin Fenner
committed
Apr 20, 2020
1 parent
f5a58cd
commit 076915e
Showing
5 changed files
with
70 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
describe "Mailable", type: :model, vcr: true do | ||
let(:token) { User.generate_token } | ||
let(:provider) { create(:provider, symbol: "DATACITE") } | ||
let(:provider) { create(:provider, symbol: "DATACITE", name: "DataCite", system_email: "[email protected]") } | ||
let(:client) { create(:client, symbol: "DATACITE.DATACITE", name: "DataCite Repository", system_email: "[email protected]", provider: provider) } | ||
let(:title) { "DataCite Fabrica" } | ||
|
||
|
@@ -55,4 +55,12 @@ | |
expect(Client.send_notification_to_slack(text, options)).to eq("ok") | ||
end | ||
end | ||
|
||
context "send_notification_to_slack provider" do | ||
it "succeeds" do | ||
text = "Using system email #{provider.system_email}." | ||
options = { title: "TEST: new provider account #{provider.symbol} created." } | ||
expect(Client.send_notification_to_slack(text, options)).to eq("ok") | ||
end | ||
end | ||
end |
8 changes: 4 additions & 4 deletions
8
spec/fixtures/vcr_cassettes/Mailable/send_notification_to_slack/succeeds.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
50 changes: 50 additions & 0 deletions
50
spec/fixtures/vcr_cassettes/Mailable/send_notification_to_slack_provider/succeeds.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
10 changes: 5 additions & 5 deletions
10
spec/fixtures/vcr_cassettes/Mailable/send_welcome_email.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.