fix test
This commit is contained in:
@@ -5,6 +5,7 @@ class UserFeedback < ActiveRecord::Base
|
|||||||
before_validation :initialize_creator, :on => :create
|
before_validation :initialize_creator, :on => :create
|
||||||
attr_accessible :body, :user_id, :category, :user_name
|
attr_accessible :body, :user_id, :category, :user_name
|
||||||
validates_presence_of :user, :creator, :body, :category
|
validates_presence_of :user, :creator, :body, :category
|
||||||
|
validates_inclusion_of :category, :in => %w(positive negative neutral)
|
||||||
validate :creator_is_gold
|
validate :creator_is_gold
|
||||||
validate :user_is_not_creator
|
validate :user_is_not_creator
|
||||||
after_create :create_dmail
|
after_create :create_dmail
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module Danbooru
|
|||||||
class Configuration
|
class Configuration
|
||||||
# The version of this Danbooru.
|
# The version of this Danbooru.
|
||||||
def version
|
def version
|
||||||
"2.9.1"
|
"2.10.0"
|
||||||
end
|
end
|
||||||
|
|
||||||
# The name of this Danbooru.
|
# The name of this Danbooru.
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ class ArtistUrlTest < ActiveSupport::TestCase
|
|||||||
should "normalize pixiv urls" do
|
should "normalize pixiv urls" do
|
||||||
url = FactoryGirl.create(:artist_url, :url => "http://img55.pixiv.net/img/monet")
|
url = FactoryGirl.create(:artist_url, :url => "http://img55.pixiv.net/img/monet")
|
||||||
assert_equal("http://img55.pixiv.net/img/monet", url.url)
|
assert_equal("http://img55.pixiv.net/img/monet", url.url)
|
||||||
assert_equal("http://img.pixiv.net/monet/", url.normalized_url)
|
assert_equal("http://img.pixiv.net/img/monet/", url.normalized_url)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user