Allow category to auto-close topics in X hours instead of days. FIX: the system message that says a topic was automatically closed was only counting in days.

This commit is contained in:
Neil Lalonde
2013-12-06 16:39:35 -05:00
parent ec26063fdc
commit 9a24d2651d
14 changed files with 68 additions and 41 deletions

View File

@ -51,7 +51,7 @@ describe CategoriesController do
xhr :post, :create, name: "hello", color: "ff0", text_color: "fff",
hotness: 2,
auto_close_days: 3,
auto_close_hours: 72,
permissions: {
"everyone" => readonly,
"staff" => create_post
@ -65,7 +65,7 @@ describe CategoriesController do
category.name.should == "hello"
category.color.should == "ff0"
category.hotness.should == 2
category.auto_close_days.should == 3
category.auto_close_hours.should == 72
end
end
end
@ -152,7 +152,7 @@ describe CategoriesController do
xhr :put, :update, id: @category.id, name: "hello", color: "ff0", text_color: "fff",
hotness: 2,
auto_close_days: 3,
auto_close_hours: 72,
permissions: {
"everyone" => readonly,
"staff" => create_post
@ -166,7 +166,7 @@ describe CategoriesController do
@category.name.should == "hello"
@category.color.should == "ff0"
@category.hotness.should == 2
@category.auto_close_days.should == 3
@category.auto_close_hours.should == 72
end
end