profiles_controller_spec.rb
上传用户:netsea168
上传日期:2022-07-22
资源大小:4652k
文件大小:1k
- require File.dirname(__FILE__) + '/../../spec_helper'
- describe Admin::ProfilesController do
- describe "#index" do
- it 'should render index' do
- users(:tobi).profile.label.should == 'admin'
- request.session = { :user => users(:tobi).id }
- get :index
- response.should render_template('index')
- end
- end
- # TODO: Make RESTful
- describe "successful POST to index" do
- it "redirects to profile page" do
- request.session = { :user => users(:tobi).id }
- post :index, :user => {:email => 'foo@bar.com'}
- response.should render_template('index')
- end
- end
- end