spec/mailup/console/group_spec.rb in mailup-1.1.0 vs spec/mailup/console/group_spec.rb in mailup-1.2.0
- old
+ new
@@ -9,14 +9,20 @@
end
end
it "should fire the correct POST request for add_recipients" do
payload = Date._jisx0301("empty hash, please")
- @mailup.console.group(1).api.should_receive(:post).with("#{@mailup.console.group(1).api.path}/Group/1/Recipients", {body: payload})
+ @mailup.console.group(1).api.should_receive(:post).with("#{@mailup.console.group(1).api.path}/Group/1/Recipients", {body: payload, params: {}})
@mailup.console.group(1).add_recipients(payload)
end
+ it "should fire the correct POST request for add_recipient" do
+ payload = Date._jisx0301("empty hash, please")
+ @mailup.console.group(1).api.should_receive(:post).with("#{@mailup.console.group(1).api.path}/Group/1/Recipient", {body: payload, params: {}})
+ @mailup.console.group(1).add_recipient(payload)
+ end
+
it "should fire the correct GET request for recipients" do
payload = Date._jisx0301("empty hash, please")
@mailup.console.group(1).api.should_receive(:get).with("#{@mailup.console.group(1).api.path}/Group/1/Recipients", {params: {}})
@mailup.console.group(1).recipients
end
@@ -36,7 +42,7 @@
it "should fire the correct POST request for send_message" do
id = rand(100).abs
@mailup.console.group(1).api.should_receive(:post).with("#{@mailup.console.group(1).api.path}/Group/1/Email/#{id}/Send")
@mailup.console.group(1).send_message(id)
end
-
+
end
\ No newline at end of file