Sha256: c26d4dc0adb5b02d95aadabbbe926501561b9a15082ddbffcc543c9d9c137638
Contents?: true
Size: 622 Bytes
Versions: 14
Compression:
Stored size: 622 Bytes
Contents
require 'spec_helper' describe Hydra::AccessControlsEvaluation do describe "editor?" do it "should return false if the session[:user] is not logged in" do controller.stub(:current_user).and_return(nil) helper.editor?.should be_false end it "should return false if the session[:user] does not have an editor role" do mock_user = mock("User") mock_user.stub(:email).and_return "nobody_special@example.com" mock_user.stub(:new_record?).and_return(false) controller.stub(:current_user).and_return(mock_user) helper.editor?.should be_false end end end
Version data entries
14 entries across 14 versions & 1 rubygems