Sha256: 50ebec40f5a3523e7b58817dfaa31175c8320bb1cbe01e4e54e8a9aa85a7814f
Contents?: true
Size: 676 Bytes
Versions: 9
Compression:
Stored size: 676 Bytes
Contents
require 'test_helper' class ACLActionOverrideTest < ActionController::TestCase test "anon can index" do assert get :check_allow, :_action => :index assert_response :ok end test "anon can't show" do assert get :check_allow, :_action => :show assert_response :unauthorized end test "normal user can't edit" do assert get :check_allow_with_foo, :_action => :edit, :user_id => User.create.id assert_response :unauthorized end test "foo owner can edit" do assert ( user = User.create ).has_role! :owner, Foo.first_or_create assert get :check_allow_with_foo, :_action => :edit, :user_id => user.id assert_response :ok end end
Version data entries
9 entries across 9 versions & 1 rubygems