parent
9a76cf7d3b
commit
c94bac3cf9
2 changed files with 9 additions and 1 deletions
|
|
@ -13,6 +13,9 @@ class NodeInfoController < ApplicationController
|
|||
end
|
||||
|
||||
def statistics
|
||||
@statistics = NodeInfoPresenter.new("1.0")
|
||||
respond_to do |format|
|
||||
format.json { head :not_acceptable }
|
||||
format.all { @statistics = NodeInfoPresenter.new("1.0") }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -51,6 +51,11 @@ describe NodeInfoController do
|
|||
end
|
||||
|
||||
describe "#statistics" do
|
||||
it "returns a 406 for json format" do
|
||||
get :statistics, format: "json"
|
||||
expect(response.code).to eq("406")
|
||||
end
|
||||
|
||||
it "responds to html" do
|
||||
get :statistics, format: "html"
|
||||
expect(response.code).to eq("200")
|
||||
|
|
|
|||
Loading…
Reference in a new issue