* Removed Pixa/Tinami sources
* Upgraded to Rails 3.2.3 * Fixed tests
This commit is contained in:
@@ -4,14 +4,14 @@ module PostSets
|
||||
class FavoriteTest < ActiveSupport::TestCase
|
||||
context "In all cases" do
|
||||
setup do
|
||||
@user = Factory.create(:user)
|
||||
@user = FactoryGirl.create(:user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
|
||||
@post_1 = Factory.create(:post)
|
||||
@post_2 = Factory.create(:post)
|
||||
@post_3 = Factory.create(:post)
|
||||
@post_1 = FactoryGirl.create(:post)
|
||||
@post_2 = FactoryGirl.create(:post)
|
||||
@post_3 = FactoryGirl.create(:post)
|
||||
@post_2.add_favorite!(@user)
|
||||
@post_1.add_favorite!(@user)
|
||||
@post_3.add_favorite!(@user)
|
||||
|
||||
@@ -4,15 +4,15 @@ module PostSets
|
||||
class PoolTest < ActiveSupport::TestCase
|
||||
context "In all cases" do
|
||||
setup do
|
||||
@user = Factory.create(:user)
|
||||
@user = FactoryGirl.create(:user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
|
||||
@post_1 = Factory.create(:post)
|
||||
@post_2 = Factory.create(:post)
|
||||
@post_3 = Factory.create(:post)
|
||||
@pool = Factory.create(:pool)
|
||||
@post_1 = FactoryGirl.create(:post)
|
||||
@post_2 = FactoryGirl.create(:post)
|
||||
@post_3 = FactoryGirl.create(:post)
|
||||
@pool = FactoryGirl.create(:pool)
|
||||
@pool.add!(@post_2)
|
||||
@pool.add!(@post_1)
|
||||
@pool.add!(@post_3)
|
||||
|
||||
@@ -5,14 +5,14 @@ module PostSets
|
||||
class PostTest < ActiveSupport::TestCase
|
||||
context "In all cases" do
|
||||
setup do
|
||||
@user = Factory.create(:user)
|
||||
@user = FactoryGirl.create(:user)
|
||||
CurrentUser.user = @user
|
||||
CurrentUser.ip_addr = "127.0.0.1"
|
||||
MEMCACHE.flush_all
|
||||
|
||||
@post_1 = Factory.create(:post, :tag_string => "a")
|
||||
@post_2 = Factory.create(:post, :tag_string => "b")
|
||||
@post_3 = Factory.create(:post, :tag_string => "c")
|
||||
@post_1 = FactoryGirl.create(:post, :tag_string => "a")
|
||||
@post_2 = FactoryGirl.create(:post, :tag_string => "b")
|
||||
@post_3 = FactoryGirl.create(:post, :tag_string => "c")
|
||||
end
|
||||
|
||||
teardown do
|
||||
@@ -33,8 +33,8 @@ module PostSets
|
||||
|
||||
context "a set for the 'a' tag query" do
|
||||
setup do
|
||||
@post_4 = Factory.create(:post, :tag_string => "a")
|
||||
@post_5 = Factory.create(:post, :tag_string => "a")
|
||||
@post_4 = FactoryGirl.create(:post, :tag_string => "a")
|
||||
@post_5 = FactoryGirl.create(:post, :tag_string => "a")
|
||||
end
|
||||
|
||||
context "with no page" do
|
||||
@@ -108,7 +108,7 @@ module PostSets
|
||||
|
||||
context "for a privileged user" do
|
||||
setup do
|
||||
CurrentUser.user = Factory.create(:privileged_user)
|
||||
CurrentUser.user = FactoryGirl.create(:privileged_user)
|
||||
end
|
||||
|
||||
should "pass" do
|
||||
@@ -142,7 +142,7 @@ module PostSets
|
||||
|
||||
context "that has a matching wiki page" do
|
||||
setup do
|
||||
@wiki_page = Factory.create(:wiki_page, :title => "a")
|
||||
@wiki_page = FactoryGirl.create(:wiki_page, :title => "a")
|
||||
end
|
||||
|
||||
should "find the wiki page" do
|
||||
@@ -153,7 +153,7 @@ module PostSets
|
||||
|
||||
context "that has a matching artist" do
|
||||
setup do
|
||||
@artist = Factory.create(:artist, :name => "a")
|
||||
@artist = FactoryGirl.create(:artist, :name => "a")
|
||||
end
|
||||
|
||||
should "find the artist" do
|
||||
|
||||
Reference in New Issue
Block a user