Mercurial > hg > soundsoftware-site
comparison test/test_helper.rb @ 1517:dffacf8a6908 redmine-2.5
Update to Redmine SVN revision 13367 on 2.5-stable branch
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:29:00 +0100 |
parents | e248c7af89ec |
children | fb9a13467253 |
comparison
equal
deleted
inserted
replaced
1516:b450a9d58aed | 1517:dffacf8a6908 |
---|---|
22 require Rails.root.join('test', 'mocks', 'open_id_authentication_mock.rb').to_s | 22 require Rails.root.join('test', 'mocks', 'open_id_authentication_mock.rb').to_s |
23 | 23 |
24 require File.expand_path(File.dirname(__FILE__) + '/object_helpers') | 24 require File.expand_path(File.dirname(__FILE__) + '/object_helpers') |
25 include ObjectHelpers | 25 include ObjectHelpers |
26 | 26 |
27 require 'awesome_nested_set/version' | |
28 | |
27 class ActiveSupport::TestCase | 29 class ActiveSupport::TestCase |
28 include ActionDispatch::TestProcess | 30 include ActionDispatch::TestProcess |
29 | 31 |
30 self.use_transactional_fixtures = true | 32 self.use_transactional_fixtures = true |
31 self.use_instantiated_fixtures = false | 33 self.use_instantiated_fixtures = false |
34 | |
35 ESCAPED_CANT = 'can't' | |
36 ESCAPED_UCANT = 'Can't' | |
37 # Rails 4.0.2 | |
38 #ESCAPED_CANT = 'can't' | |
39 #ESCAPED_UCANT = 'Can't' | |
32 | 40 |
33 def log_user(login, password) | 41 def log_user(login, password) |
34 User.anonymous | 42 User.anonymous |
35 get "/login" | 43 get "/login" |
36 assert_equal nil, session[:user_id] | 44 assert_equal nil, session[:user_id] |
202 end | 210 end |
203 end | 211 end |
204 | 212 |
205 def mail_body(mail) | 213 def mail_body(mail) |
206 mail.parts.first.body.encoded | 214 mail.parts.first.body.encoded |
215 end | |
216 | |
217 # awesome_nested_set new node lft and rgt value changed this refactor revision. | |
218 # https://github.com/collectiveidea/awesome_nested_set/commit/199fca9bb938e40200cd90714dc69247ef017c61 | |
219 # The reason of behavior change is that "self.class.base_class.unscoped" was added to this line. | |
220 # https://github.com/collectiveidea/awesome_nested_set/commit/199fca9bb9#diff-f61b59a5e6319024e211b0ffdd0e4ef1R273 | |
221 # It seems correct behavior because of this line comment. | |
222 # https://github.com/collectiveidea/awesome_nested_set/blame/199fca9bb9/lib/awesome_nested_set/model.rb#L278 | |
223 def new_issue_lft | |
224 ::AwesomeNestedSet::VERSION > "2.1.6" ? Issue.maximum(:rgt) + 1 : 1 | |
207 end | 225 end |
208 end | 226 end |
209 | 227 |
210 module Redmine | 228 module Redmine |
211 module ApiTest | 229 module ApiTest |