summaryrefslogtreecommitdiff
path: root/test/controllers/admin_controller_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/controllers/admin_controller_test.rb')
-rw-r--r--test/controllers/admin_controller_test.rb15
1 files changed, 12 insertions, 3 deletions
diff --git a/test/controllers/admin_controller_test.rb b/test/controllers/admin_controller_test.rb
index 9bbf29b..d6005ba 100644
--- a/test/controllers/admin_controller_test.rb
+++ b/test/controllers/admin_controller_test.rb
@@ -1,8 +1,17 @@
1require 'test_helper' 1require 'test_helper'
2 2
3class AdminControllerTest < ActionController::TestCase 3class AdminControllerTest < ActionController::TestCase
4 # Replace this with your real tests. 4 test "current drafts includes nodes with only an autosave" do
5 test "the truth" do 5 node = Node.root.children.create!(:slug => "admin_autosave_only")
6 assert true 6 node.lock_for_editing!(User.find_by_login("aaron"))
7 node.autosave!({title: "in progress"}, User.find_by_login("aaron"))
8 node.save_draft!(User.find_by_login("aaron"))
9 node.publish_draft!
10 node.lock_for_editing!(User.find_by_login("aaron"))
11 node.autosave!({title: "editing again"}, User.find_by_login("aaron"))
12
13 login_as :quentin
14 get :index
15 assert_includes assigns(:drafts), node
7 end 16 end
8end 17end