##// END OF EJS Templates
Fixes Setting.openid? (#2764)....
Jean-Philippe Lang -
r2419:9525e5f147a8
parent child
Show More
@@ -141,7 +141,7 class Setting < ActiveRecord::Base
141 141 end
142 142
143 143 def self.openid?
144 Object.const_defined?(:OpenID) && self['openid'].to_s == '1'
144 Object.const_defined?(:OpenID) && self[:openid].to_i > 0
145 145 end
146 146
147 147 # Checks if settings have changed since the values were read
@@ -136,6 +136,11 class AccountControllerTest < Test::Unit::TestCase
136 136 assert_equal 'http://openid.example.com/good_user', assigns(:user)[:identity_url]
137 137 end
138 138
139 def test_setting_openid_should_return_true_when_set_to_true
140 Setting.openid = '1'
141 assert_equal true, Setting.openid?
142 end
143
139 144 else
140 145 puts "Skipping openid tests."
141 146 end
General Comments 0
You need to be logged in to leave comments. Login now