阅读背景:

如何编写功能/控制器测试以检查通过AJAX调用添加的内容?

来源:互联网 

Test

def test_generateCashFlowStmt
    get :getDateRangeForCashFlowStmt
    xhr :post,
      :generate_cash_flow_stmt, 
      {:fromDate =>  {:year=>"2009", :month => "3", :day=>"1"},
      :toDate => {:year=>"2009", :month => "3", :day=>"31"} }

    table = [ ....       ]
    assert_equal table, formatCashFlowStatementAsTable( assigns(:cashFlowStmt))
    assert_tag :tag => "div", :children => {:count => 1, :only => {:tag=>"table"} }
  end
def test_generateCashFlowStmt
    get :g



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: