Sha256: 66f58855778a8bd768666a81ffa81eac6e96110b97dab6f6bdda072138514ddc

Contents?: true

Size: 969 Bytes

Versions: 2

Compression:

Stored size: 969 Bytes

Contents

require "spec_helper"

#
# routes
#  POST /errors(.:format) {:action=>"create", :controller=>"errors"}
#  PUT /errors/:id(.:format) {:action=>"update", :controller=>"errors"}
#  DELETE /errors/:id(.:format) {:action=>"destroy", :controller=>"errors"}
#
describe "errors response status codes" do
  describe "POST /errors(.:format)" do
    it "should have a response", :vcr do
      format = nil
      post "/errors#{format ? "." : nil}#{format}"
      response.status.should be(201)
    end
  end

  describe "PUT /errors/:id(.:format)" do
    it "should have a response", :vcr do
      id = "REPLACE"
      format = nil
      put "/errors/#{id}#{format ? "." : nil}#{format}"
      response.status.should be(200)
    end
  end

  describe "DELETE /errors/:id(.:format)" do
    it "should have a response", :vcr do
      id = "REPLACE"
      format = nil
      delete "/errors/#{id}#{format ? "." : nil}#{format}"
      response.status.should be(200)
    end
  end

end

Version data entries

2 entries across 1 versions & 1 rubygems

Version Path
routespec-0.0.1 test/sandbox/requests/errors/errors_spec.rb
routespec-0.0.1 test/sandbox/requests2/errors/errors_spec.rb