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