diaspora/spec/controllers/statistics_controller_spec.rb
2015-03-18 21:59:56 +01:00

30 lines
787 B
Ruby

# Copyright (c) 2010-2011, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require "spec_helper"
describe StatisticsController, type: :controller do
describe "#statistics" do
it "responds to format json" do
get :statistics, format: "json"
expect(response.code).to eq("200")
end
it "contains json" do
get :statistics, format: "json"
json = JSON.parse(response.body)
expect(json["name"]).to be_present
end
it "responds to html" do
get :statistics, format: "html"
expect(response.code).to eq("200")
end
it "responds to mobile" do
get :statistics, format: "mobile"
expect(response.code).to eq("200")
end
end
end