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 に答える