Add basic terms controller spec
This commit is contained in:
parent
d0f6a7fe89
commit
b296e73c36
2 changed files with 16 additions and 1 deletions
|
|
@ -220,7 +220,7 @@ Diaspora::Application.routes.draw do
|
|||
get "statistics", to: "node_info#statistics"
|
||||
|
||||
# Terms
|
||||
if AppConfig.settings.terms.enable?
|
||||
if AppConfig.settings.terms.enable? || Rails.env.test?
|
||||
get 'terms' => 'terms#index'
|
||||
end
|
||||
|
||||
|
|
|
|||
15
spec/controllers/terms_controller_spec.rb
Normal file
15
spec/controllers/terms_controller_spec.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
require "spec_helper"
|
||||
|
||||
describe TermsController, type: :controller do
|
||||
describe "#index" do
|
||||
it "succeeds" do
|
||||
get :index
|
||||
expect(response).to be_success
|
||||
end
|
||||
|
||||
it "succeeds on mobile" do
|
||||
get :index, format: :mobile
|
||||
expect(response).to be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Reference in a new issue