Sha256: 2aaebef48884fb76562a42becd3a6f6950d57c77af0323b4fd61bb02fd2e060d

Contents?: true

Size: 717 Bytes

Versions: 14

Compression:

Stored size: 717 Bytes

Contents

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

class UserTest < ActiveSupport::TestCase
  context "activities" do
    setup do
      @user = Factory(:user)
    end
    should_have_many :activity_feeds
    should_have_many :activities
    should "create an activity" do
      assert_difference "Activity.count", 1 do
        @user.add_activity(@user.feed_to, @user, @user, 'status_update', 'status', 'a status update')
      end
    end
    should "set the user's current status" do
      activity = @user.add_activity(@user.feed_to, @user, @user, 'status_update', 'status', 'a status update')
      activity.is_status_update = true
      activity.save!
      assert_equal @user.status, activity
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
muck-activities-0.1.25 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.24 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.23 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.22 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.21 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.20 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.17 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.18 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.19 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.12 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.13 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.14 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.15 test/rails_root/test/unit/user_test.rb
muck-activities-0.1.16 test/rails_root/test/unit/user_test.rb