added tests for post sets
This commit is contained in:
@@ -21,6 +21,17 @@ module PostSets
|
||||
offset == 0
|
||||
end
|
||||
|
||||
def validate
|
||||
super
|
||||
validate_page
|
||||
end
|
||||
|
||||
def validate_page
|
||||
if page > 1_000
|
||||
raise Error.new("You cannot explicitly specify the page after page 1000")
|
||||
end
|
||||
end
|
||||
|
||||
def page
|
||||
@page ||= params[:page] ? params[:page].to_i : 1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user