Sha256: a8fb8e0190c94ffe22b7ad2f7acb61bb2686abd85f45e16cc3c2dc3216bdbe82
Contents?: true
Size: 739 Bytes
Versions: 3
Compression:
Stored size: 739 Bytes
Contents
require "test_helper" module Fogged class ResourcesControllerUpdateTest < ActionController::TestCase tests ResourcesController include ResourceTestHelper def setup super @resource = fogged_resources(:resource_png) end test "should update resource" do put :update, :id => @resource, :resource => { :name => "Update" }, :use_route => :fogged assert_json_resource(@resource.reload) end test "should not update resource with invalid id" do assert_raise(ActiveRecord::RecordNotFound) do put :update, :id => 1234567890, :resource => { :name => "Update" }, :use_route => :fogged end end end end
Version data entries
3 entries across 3 versions & 1 rubygems