Sha256: 348acf9fd64e29a4f3e5d67e1725114bac21872a7c7c9d909c85e77db8a7a9c2

Contents?: true

Size: 563 Bytes

Versions: 1

Compression:

Stored size: 563 Bytes

Contents

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

describe Valid do
  include Goliath::TestHelper

  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.0 spec/integration/valid_spec.rb