spec/mailup/public/console_spec.rb in mailup-1.1.0 vs spec/mailup/public/console_spec.rb in mailup-1.2.0

- old
+ new

@@ -1,24 +1,24 @@ require 'spec_helper' describe MailUp::Public::Console do before(:each) { init_mailup } - %w(new status).each do |method| + %w(activate_trial status).each do |method| it "should have a #{method} method" do @mailup.public.console.should respond_to(method.to_sym) end end - it "should fire the correct POST request for new" do + it "should fire the correct POST request for activate_trial" do payload = Date._jisx0301("empty hash, please") - @mailup.public.console.api.should_receive(:post).with("#{@mailup.public.console.api.path}/Console/TrialActivation", {body: payload}) - @mailup.public.console.new(payload) + @mailup.public.console.api.should_receive(:provisioning_request).with("#{@mailup.public.console.api.path}/Console/TrialActivation", payload) + @mailup.public.console.activate_trial(payload) end it "should fire the correct POST request for status" do payload = Date._jisx0301("empty hash, please") - @mailup.public.console.api.should_receive(:post).with("#{@mailup.public.console.api.path}/Console/TrialActivationStatus", {body: payload}) + @mailup.public.console.api.should_receive(:provisioning_request).with("#{@mailup.public.console.api.path}/Console/TrialActivationStatus", payload) @mailup.public.console.status(payload) end end \ No newline at end of file