Sha256: 2b4a9e067154e4c7e34954b673f51f21c7c2829a47ea9872d6a654e8fedb5e1b
Contents?: true
Size: 544 Bytes
Versions: 2
Compression:
Stored size: 544 Bytes
Contents
require File.dirname(__FILE__) + '/../../spec_helper' describe Admin::ProductsController do context "#index" do it "should not allow JSON request without a valid token" do expect { get :index, {:format => :json} }.to raise_error ActionController::InvalidAuthenticityToken end it "should allow JSON request with a valid token" do controller.stub :form_authenticity_token => "123456" get :index, {:authenticity_token => "123456", :format => :json} response.should be_success end end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
MyCommerceapi-1.0.0 | core/spec/controllers/admin/products_controller_spec.rb |
MyCommerce-0.0.3 | core/spec/controllers/admin/products_controller_spec.rb |