Skip to content
This repository has been archived by the owner on Jan 4, 2021. It is now read-only.

(#430) use https for the choria icon on slack #450

Merged
merged 1 commit into from Mar 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mcollective/util/playbook/tasks/slack_task.rb
Expand Up @@ -18,7 +18,7 @@ def from_hash(data)
@token = data["token"]
@color = data.fetch("color", "#ffa449")
@username = data.fetch("username", "Choria")
@icon = "http://choria.io/img/slack-48x48.png"
@icon = "https://choria.io/img/slack-48x48.png"

self
end
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/mcollective/util/playbook/tasks/slack_task_spec.rb
Expand Up @@ -96,7 +96,7 @@ class Tasks
choria.expects(:https).with(:target => "slack.com", :port => 443).returns(https = stub)
task.expects(:attachments).returns([])
choria.expects(:http_get).with(
"/api/chat.postMessage?token=RSPEC_TOKEN&username=Rspec+Bot&channel=%23general&icon_url=http%3A%2F%2Fchoria.io%2Fimg%2Fslack-48x48.png&attachments=%5B%5D"
"/api/chat.postMessage?token=RSPEC_TOKEN&username=Rspec+Bot&channel=%23general&icon_url=https%3A%2F%2Fchoria.io%2Fimg%2Fslack-48x48.png&attachments=%5B%5D"
).returns(get = stub)
https.expects(:request).with(get).returns([stub(:code => "200", :body => JSON.dump("ok" => true))])

Expand All @@ -113,7 +113,7 @@ class Tasks
task.stubs(:choria).returns(choria = stub)
choria.expects(:https).with(:target => "slack.com", :port => 443).returns(https = stub)
choria.expects(:http_get).with(
"/api/chat.postMessage?token=RSPEC_TOKEN&username=Rspec+Bot&channel=%23general&icon_url=http%3A%2F%2Fchoria.io%2Fimg%2Fslack-48x48.png&attachments=%5B%5D"
"/api/chat.postMessage?token=RSPEC_TOKEN&username=Rspec+Bot&channel=%23general&icon_url=https%3A%2F%2Fchoria.io%2Fimg%2Fslack-48x48.png&attachments=%5B%5D"
).returns(get = stub)
https.expects(:request).with(get).returns([stub(:code => "500", :body => JSON.dump("ok" => false, "error" => "rspec error"))])

Expand Down