0
if !@app_key
   # throw error here for unknown app
   Rails.logger.error { "Invalid APP Key provided #{app_key}" }
   render :status => 412, :error => "Invalid App Key", :nothing => true
end

如何匹配渲染 :status => 412, :error => "Invalid App Key"

4

1 回答 1

0

尝试这样的事情:

response.status.should eq(412)
flash[:error].should eq("Invalid App Key")
于 2013-03-06T12:58:08.450 回答