+ assert_equal 16, assigns(:zoom)
+ end
+
+ # Test the edit page redirects
+ def test_edit_redirect
+ get :edit, :lat => 4, :lon => 5
+ assert_redirected_to :controller => :site, :action => :edit, :anchor => 'map=5/4/5'
+
+ get :edit, :lat => 4, :lon => 5, :zoom => 3
+ assert_redirected_to :controller => :site, :action => :edit, :anchor => 'map=3/4/5'
+
+ get :edit, :lat => 4, :lon => 5, :zoom => 3, :editor => 'id'
+ assert_redirected_to :controller => :site, :action => :edit, :editor => 'id', :anchor => 'map=3/4/5'
+ end
+
+ # Test the copyright page
+ def test_copyright
+ get :copyright
+ assert_response :success
+ assert_template "copyright"
+ end
+
+ # Test the welcome page
+ def test_welcome
+ get :welcome
+ assert_response :redirect
+ assert_redirected_to :controller => :user, :action => :login, :referer => "/welcome"
+
+ get :welcome, nil, { :user => users(:public_user).id }
+ assert_response :success
+ assert_template "welcome"
+ end
+
+ # Test the help page
+ def test_help
+ get :help
+ assert_response :success
+ assert_template "help"
+ end
+
+ # Test the about page
+ def test_about
+ get :about
+ assert_response :success
+ assert_template "about"
+ end
+
+ # Test the export page
+ def test_export
+ get :export
+ assert_response :success
+ assert_template "export"
+ assert_template :layout => "map"
+
+ xhr :get, :export
+ assert_response :success
+ assert_template "export"
+ assert_template :layout => "xhr"
+ end
+
+ # Test the offline page
+ def test_offline
+ get :offline
+ assert_response :success
+ assert_template "offline"
+ end
+
+ # Test the rich text preview
+ def test_preview
+ xhr :post, :preview, :format => "html"
+ assert_response :success
+
+ xhr :post, :preview, :format => "markdown"
+ assert_response :success
+
+ xhr :post, :preview, :format => "text"
+ assert_response :success
+ end
+
+ # Test the id frame
+ def test_id
+ get :id, nil, { :user => users(:public_user).id }
+ assert_response :success
+ assert_template "id"
+ assert_template :layout => false