Sha256: 5bdfd08e40a32186290127dadfd1d6655a8c05764d793a101c8cc425741b3205

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

require 'spec_helper'
require File.join(File.dirname(__FILE__), '../../', 'examples/valid')

describe Valid do
  let(:err) { Proc.new { fail "API request failed" } }

  it 'returns OK with param' do
    with_api(Valid) do
      get_request({:query => {:test => 'test'}}, err) do |c|
        c.response.should == 'OK'
      end
    end
  end

  it 'returns error without param' do
    with_api(Valid) do
      get_request({}, err) do |c|
        c.response.should == '[:error, "Test identifier missing"]'
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
goliath-0.9.1 spec/integration/valid_spec.rb