Skip to content

Commit

Permalink
Made more tests for SQLServer pass (closes #2486) [Tom Ward]
Browse files Browse the repository at this point in the history
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2779 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Oct 28, 2005
1 parent 816f37a commit bc73b83
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions activerecord/test/associations_test.rb
Expand Up @@ -1246,7 +1246,7 @@ def test_additional_columns_from_join_table
# SQL Server doesn't have a separate column type just for dates, # SQL Server doesn't have a separate column type just for dates,
# so the time is in the string and incorrectly formatted # so the time is in the string and incorrectly formatted
if current_adapter?(:SQLServerAdapter) if current_adapter?(:SQLServerAdapter)
assert_equal Time.mktime(2004, 10, 10).strftime("%Y/%m/%d 00:00:00"), Time.parse(Developer.find(1).projects.first.joined_on).strftime("%Y/%m/%d 00:00:00") assert_equal Time.mktime(2004, 10, 10).strftime("%Y/%m/%d 00:00:00"), Developer.find(1).projects.first.joined_on.strftime("%Y/%m/%d 00:00:00")
else else
assert_equal Date.new(2004, 10, 10).to_s, Developer.find(1).projects.first.joined_on.to_s assert_equal Date.new(2004, 10, 10).to_s, Developer.find(1).projects.first.joined_on.to_s
end end
Expand All @@ -1267,8 +1267,8 @@ def test_rich_association
# SQL Server doesn't have a separate column type just for dates, # SQL Server doesn't have a separate column type just for dates,
# so the time is in the string and incorrectly formatted # so the time is in the string and incorrectly formatted
if current_adapter?(:SQLServerAdapter) if current_adapter?(:SQLServerAdapter)
assert_equal Time.now.strftime("%Y/%m/%d 00:00:00"), Time.parse(jamis.projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on).strftime("%Y/%m/%d 00:00:00") assert_equal Time.now.strftime("%Y/%m/%d 00:00:00"), jamis.projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.strftime("%Y/%m/%d 00:00:00")
assert_equal Time.now.strftime("%Y/%m/%d 00:00:00"), Time.parse(developers(:jamis).projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on).strftime("%Y/%m/%d 00:00:00") assert_equal Time.now.strftime("%Y/%m/%d 00:00:00"), developers(:jamis).projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.strftime("%Y/%m/%d 00:00:00")
else else
assert_equal Date.today.to_s, jamis.projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.to_s assert_equal Date.today.to_s, jamis.projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.to_s
assert_equal Date.today.to_s, developers(:jamis).projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.to_s assert_equal Date.today.to_s, developers(:jamis).projects.select { |p| p.name == projects(:action_controller).name }.first.joined_on.to_s
Expand Down

0 comments on commit bc73b83

Please sign in to comment.