This commit is contained in:
albert
2010-08-18 18:44:18 -04:00
parent 5610731b35
commit 694b6f0813
13 changed files with 1018 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
Factory.define(:favorite) do |f|
end

View File

@@ -0,0 +1,18 @@
require_relative "../test_helper"
class ArtistTest < ActiveSupport::TestCase
context "The current user" do
should "be set only within the scope of the block" do
user = Factory.create(:user)
assert_nil(CurrentUser.user)
assert_nil(CurrentUser.ip_addr)
CurrentUser.user = user
CurrentUser.ip_addr = "1.2.3.4"
assert_equal(user.id, CurrentUser.current_user)
assert_equal("1.2.3.4", CurrentUser.current_ip_addr)
end
end
end