Sha256: 31d1c4c1a06f8cde721651008c26fc168c840d67d6fbb0a55d90c5674cf95d44

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 Bytes

Contents

require 'spec_helper'

describe MailUp::Public::Console do
  before(:each) { init_mailup }

  %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 activate_trial" do
    payload = Date._jisx0301("empty hash, please")
    @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(:provisioning_request).with("#{@mailup.public.console.api.path}/Console/TrialActivationStatus", payload)
    @mailup.public.console.status(payload)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailup-1.2.0 spec/mailup/public/console_spec.rb