refactored anon pools

This commit is contained in:
albert
2011-09-16 19:01:40 -04:00
parent d664cca4a4
commit f56ae86b5b
3 changed files with 9 additions and 13 deletions

View File

@@ -248,9 +248,13 @@ class PoolTest < ActiveSupport::TestCase
end
context "An anonymous pool" do
should "have a name starting with anon" do
setup do
user = Factory.create(:user)
pool = Pool.create_anonymous(user, "127.0.0.1")
CurrentUser.user = user
end
should "have a name starting with anon" do
pool = Pool.create_anonymous
assert_match(/^anon:\d+$/, pool.name)
end
end