Sha256: ebfdde032b47e518d175b47c9883eca33a382310f0d2d263956bb003c780bbb8

Contents?: true

Size: 1016 Bytes

Versions: 1

Compression:

Stored size: 1016 Bytes

Contents

require 'json'
require 'spec_helper'

describe Switchcoder do
  it "should do GET and return Net::HTTPResponse" do
    
    client = Switchcoder::Client.new('1231232123', 'api.switchcoder.com', method: :get);
    phone_number = client.phone_number('19195551212');
    code = client.code(123);
    request_parameters = {parameter1:'parameter1Value', parameter2:'parameter2Value'};
    request_body = {bodyValue1:'my text'};

    response = code.invoke(request_parameters, request_body.to_json)

    response.should be_a Net::HTTPResponse

  end

  it "should do GET and return Net::HTTPResponse" do
    
    client = Switchcoder::Client.new('1231232123', 'api.switchcoder.com');
    phone_number = client.phone_number('19195551212');
    code = client.code(123);
    request_parameters = {parameter1:'parameter1Value', parameter2:'parameter2Value'};
    request_body = {bodyValue1:'my text'};

    response = code.invoke(request_parameters, request_body.to_json)

    response.should be_a Net::HTTPResponse

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
switchcoder-0.0.1 spec/lib/switchcoder_spec.rb