Sha256: 6ecfb0e85c0f5ac95fe8eba3cfcb70b7b39fa45bb0e8d5994eb82a554d45a690
Contents?: true
Size: 921 Bytes
Versions: 16
Compression:
Stored size: 921 Bytes
Contents
require 'spec_helper' describe PermissionsController do include SocialStream::TestHelpers::Controllers render_views describe "when authenticated" do before do @user = Factory(:user) sign_in @user end context "with an existing relation" do before do @relation = Factory(:relation_custom, :actor_id => @user.actor_id) end it "should render index" do get :index, :relation_id => @relation.id, :format => "html" response.should be_success end end context "a external relation" do before do @relation = Factory(:relation_custom) end it "should not render index" do begin get :index, :relation_id => @relation.id, :format => "html" assert false rescue ActiveRecord::RecordNotFound assigns(:permissions).should be_nil end end end end end
Version data entries
16 entries across 16 versions & 2 rubygems