require 'spec_helper'
context 'not signed in' do
context 'on GET to index' do
end
end
end
it { should respond_with :success }
it { should render_template :index }
end
it { should respond_with :success }
it { should render_template :new }
end
it { should respond_with :success }
it { should render_template :index }
end
it { should respond_with :success }
it { should render_template :show }
end
it { should respond_with :success }
it { should render_template :edit }
end
end
end
before do
team.users << member
sign_in member
delete :destroy, id: team.id
end
it { should redirect_to(:root) }
it 'sets the flash' do
expect(flash[:alert]).to match(/not authorized/)
end
end
end
end
end
end