Sha256: fdb23a2ddc40999e5d5669300c985dbd90f931bd72a8dd88abb6cfdead5c66ed

Contents?: true

Size: 572 Bytes

Versions: 3

Compression:

Stored size: 572 Bytes

Contents

require 'spec_helper'

describe Calamum::Request do
  before do
    @attrs = {uri: '/users', action: 'get', params: {id:{type: 'String'}}, content_type: 'application/json'} 
  end

  specify{Calamum::Request.new(@attrs).should be_true}
  specify{Calamum::Request.new(@attrs.merge(uri:'')).errors[:uri].should == ["can't be blank"]}
  specify{Calamum::Request.new(@attrs.merge(action:'')).errors[:action].should == ["can't be blank"]}
  specify{Calamum::Request.new(@attrs.merge(action:'foo')).errors[:action].should == ["is not included in [GET POST PUT DELETE]"]}
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
calamum-1.0.2 spec/request_spec.rb
calamum-1.0.1 spec/request_spec.rb
calamum-1.0.0 spec/request_spec.rb