* Removed Pixa/Tinami sources

* Upgraded to Rails 3.2.3
* Fixed tests
This commit is contained in:
albert
2012-06-01 19:22:58 -04:00
parent 105cba5963
commit 17881068e1
124 changed files with 1063 additions and 1214 deletions

View File

@@ -3,10 +3,10 @@ require 'test_helper'
class CommentVotesControllerTest < ActionController::TestCase
context "A comment votes controller" do
setup do
CurrentUser.user = @user = Factory.create(:user)
CurrentUser.user = @user = FactoryGirl.create(:user)
CurrentUser.ip_addr = "127.0.0.1"
Danbooru.config.stubs(:member_comment_time_threshold).returns(1.week.from_now)
@comment = Factory.create(:comment)
@comment = FactoryGirl.create(:comment)
end
teardown do
@@ -22,7 +22,7 @@ class CommentVotesControllerTest < ActionController::TestCase
end
should "fail silently on errors" do
Factory.create(:comment_vote, :comment => @comment)
FactoryGirl.create(:comment_vote, :comment => @comment)
assert_difference("CommentVote.count", 0) do
post :create, {:format => "js", :comment_id => @comment.id, :score => 1}, {:user_id => @user.id}
assert_response :success