Sha256: 397736f447521b0da2fcc1323b951e32e143bf6b74b35ca0b7a0ba0a75e4a18b

Contents?: true

Size: 534 Bytes

Versions: 15

Compression:

Stored size: 534 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

# Used to test muck_friend_user
class UserTest < ActiveSupport::TestCase

  context "A class that is commentable" do
    setup do
      @user = Factory(:user)
      @comment = @user.comments.build(:body => 'a test comment')
      @comment.user = @user
      @comment.save!
    end
    
    should "have comments" do
      assert_equal 1, @user.comments.length
    end
    should "have comment cache" do
      @user.reload
      assert_equal 1, @user.comment_count
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
muck-comments-0.1.21 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.20 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.19 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.18 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.17 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.16 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.15 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.14 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.13 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.12 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.11 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.10 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.7 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.8 test/rails_root/test/unit/user_test.rb
muck-comments-0.1.9 test/rails_root/test/unit/user_test.rb