Sha256: ec8a7b843cf4c97d5adc75c5ca71a8f6ccde680ab7d0a1b87af22a3255aa9033

Contents?: true

Size: 508 Bytes

Versions: 4

Compression:

Stored size: 508 Bytes

Contents

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

describe Tr8n::HelpController 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/help_controller_spec.rb
tr8n-3.2.2 spec/controllers/help_controller_spec.rb
tr8n-3.2.1 spec/controllers/help_controller_spec.rb
tr8n-3.2.0 spec/controllers/help_controller_spec.rb