themes_controller_test.rb
来自「用ruby on rails写的一个博客程序,还不错..ruby on rail」· RB 代码 · 共 35 行
RB
35 行
require File.dirname(__FILE__) + '/../../test_helper'require 'admin/themes_controller'# Re-raise errors caught by the controller.class Admin::ThemesController; def rescue_action(e) raise e end; endclass Admin::ThemesControllerTest < Test::Unit::TestCase fixtures :users def setup @controller = Admin::ThemesController.new @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new @request.session = { :user => users(:tobi) } end # Replace this with your real tests. def test_index get :index assert_response :success assert_not_nil assigns(:themes) end def test_switchto get :switchto, :theme => 'azure' assert_response :redirect, :action => 'index' end def test_preview get :preview, :theme => 'azure' assert_response :success endend
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?