Sha256: 0ec117b630050bb1c8363ba498e7a7d0d1bdb77cdb8e5a224cbc0996cf05c913

Contents?: true

Size: 510 Bytes

Versions: 4

Compression:

Stored size: 510 Bytes

Contents

require File.expand_path('../spec_helper', File.dirname(__FILE__))

describe Tr8n::DashboardController do  

  describe "guest user" do 
	  it "should be redirect to homepage" do
	    get :index
	    response.should redirect_to('/')
	  end
  end	  

  describe "logged in user" do
	  it "should redirect the guest user to homepage" do
	    @user = User.create(:first_name => "Mike", :gender => "male")
	    request.session[:user_id] = @user.id

	    get :index
	    response.should be_success
	  end
	end


end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tr8n-3.2.3 spec/controllers/dashboard_controller_spec.rb
tr8n-3.2.2 spec/controllers/dashboard_controller_spec.rb
tr8n-3.2.1 spec/controllers/dashboard_controller_spec.rb
tr8n-3.2.0 spec/controllers/dashboard_controller_spec.rb