lshimokawa/openspace — Issue #3: Testing ApplicationController private methods
Author: frodsan
Created: 2012-02-23 21:39:51+00:00
State: open

require 'spec_helper'

describe ApplicationController do

it "should return current user in session" do
user = Factory.create(:user)
session[:user_id] = user.id
controller.send(:current_user).should == user
end

it "should return current event in session" do
event = Factory.create(:event)
session[:event_id] = event.id
controller.send(:current_event).should == event
end

end