Sha256: 324a099f31aba2b68039a3ac57b0af2b4a268fe379869184206d837d20a98bfd
Contents?: true
Size: 827 Bytes
Versions: 19
Compression:
Stored size: 827 Bytes
Contents
require File.join(File.dirname(__FILE__),'spec_helper') describe "Application" do it_should_behave_like "SpecHelper" do before(:each) do if SugarCRM.sessions.size > 0 SugarCRM.disconnect! end end it "should authenticate" do Application.authenticate(@test_user,@test_password,nil).should be_true end it "should authenticate using SugarCRM.reconnect" do Application.authenticate(@test_user,@test_password,nil).should be_true Application.authenticate(@test_user,@test_password,nil).should be_true end it "should not authenticate with wrong credentials" do Application.should_receive(:warn).once.with(/Can't authenticate user wrong_user:/) Application.authenticate('wrong_user','wrong_password',nil).should be_false end end end
Version data entries
19 entries across 19 versions & 1 rubygems