Sha256: 1f63aa5e4f6cc0a8a59f1945a787f90ec5f2d6851010146c4f7bd984bf74aa1f

Contents?: true

Size: 598 Bytes

Versions: 5

Compression:

Stored size: 598 Bytes

Contents

# Copyright 2011-2012 Rice University. Licensed under the Affero General Public 
# License version 3 or later.  See the COPYRIGHT file for details.

require 'test_helper'

class CommentThreadSubscriptionTest < ActiveSupport::TestCase

  test 'one comment_thread_subscription per user per thread' do
    u = FactoryGirl.create(:user)
    ct = FactoryGirl.create(:comment_thread)
    cts0 = CommentThreadSubscription.create(:user => u, :comment_thread => ct)
    cts1 = CommentThreadSubscription.new(:user => u, :comment_thread => ct)
    assert !cts1.save
    cts0.destroy
    cts1.save!
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
commontator-0.4.1 test/unit/comment_thread_subscription_test.rb~
commontator-0.3.10 test/unit/comment_thread_subscription_test.rb~
commontator-0.2.4 test/unit/comment_thread_subscription_test.rb~
commontator-0.2.0 test/unit/comment_thread_subscription_test.rb~
commontator-0.1.46 test/unit/comment_thread_subscription_test.rb~