Created
February 28, 2013 01:52
-
-
Save samkeen/5053548 to your computer and use it in GitHub Desktop.
General Rspec for REST api with no UI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
include Rack::Test::Methods | |
def app | |
Rails.application | |
end | |
describe CuuidsController do | |
describe "submitting to the update action" do | |
it "does not allow POSTS to /cuuids" do | |
expect { | |
post cuuids_path, cuuid: {name: 'target'} | |
}.to raise_error ActionController::RoutingError | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment