From d6a46884546200b7c4f9a4d02e61a3c3e1f893ba Mon Sep 17 00:00:00 2001 From: Eric Hutzelman Date: Wed, 11 Nov 2009 00:09:05 -0600 Subject: [PATCH] update post and user unit tests --- test/unit/post_test.rb | 9 --------- test/unit/user_test.rb | 4 ++++ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/test/unit/post_test.rb b/test/unit/post_test.rb index a22e68b..d444544 100644 --- a/test/unit/post_test.rb +++ b/test/unit/post_test.rb @@ -22,13 +22,4 @@ class PostTest < ActiveSupport::TestCase end end - private - - def mock_messages_xml - xml = File.open("#{RAILS_ROOT}/test/fixtures/messages.xml") do |f| - f.read - end - Post.expects(:messages_xml).returns(xml) - end - end diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 9425ee2..98ac086 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -38,6 +38,10 @@ class UserTest < ActiveSupport::TestCase should "be returned for User#random" do assert_equal @user, User.random end + + should "be included in the displayable named scope" do + assert_equal @user, User.displayable.first + end end end