Newer
Older
maxwell
a validé
require File.dirname(__FILE__) + '/../spec_helper'
describe DashboardController do
maxwell
a validé
request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user)
end
it "index action should render index template" do
maxwell
a validé
get :index
response.should render_template(:index)
end
it "on index sets a friends variable" do
Factory.create :friend
get :index
assigns[:friends].should == Friend.all
end
maxwell
a validé