Fixed deprecation warnings
This commit is contained in:
parent
26a2f44ff1
commit
a1ba2625bf
3 changed files with 36 additions and 6 deletions
|
|
@ -12,15 +12,12 @@ Debshots::Application.configure do
|
||||||
# preloads Rails for running tests, you may have to set it to true.
|
# preloads Rails for running tests, you may have to set it to true.
|
||||||
config.eager_load = false
|
config.eager_load = false
|
||||||
|
|
||||||
# ActiveRecord errors propagate normally (forward deprecation to Rails 5)
|
|
||||||
config.active_record.raise_in_transactional_callbacks = true
|
|
||||||
|
|
||||||
# Test :sorted or :random. ":random" may be safer but harder to debug.
|
# Test :sorted or :random. ":random" may be safer but harder to debug.
|
||||||
config.active_support.test_order = :sorted
|
config.active_support.test_order = :sorted
|
||||||
|
|
||||||
# Configure static asset server for tests with Cache-Control for performance.
|
# Configure static asset server for tests with Cache-Control for performance.
|
||||||
config.serve_static_files = true
|
config.public_file_server.enabled = true
|
||||||
config.static_cache_control = "public, max-age=3600"
|
config.public_file_server.headers = { 'Cache-Control' => 'public, max-age=3600' }
|
||||||
|
|
||||||
# Show full error reports and disable caching.
|
# Show full error reports and disable caching.
|
||||||
config.consider_all_requests_local = true
|
config.consider_all_requests_local = true
|
||||||
|
|
|
||||||
19
test/controllers/admin_controller_test.rb
Normal file
19
test/controllers/admin_controller_test.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
require "test_helper"
|
||||||
|
|
||||||
|
describe AdminController do
|
||||||
|
it "should get status" do
|
||||||
|
get admin_status_url
|
||||||
|
value(response).must_be :success?
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should get screenshots" do
|
||||||
|
get admin_screenshots_url
|
||||||
|
value(response).must_be :success?
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should get integration" do
|
||||||
|
get admin_integration_url
|
||||||
|
value(response).must_be :success?
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
14
test/controllers/my_controller_test.rb
Normal file
14
test/controllers/my_controller_test.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
require "test_helper"
|
||||||
|
|
||||||
|
describe MyController do
|
||||||
|
it "should get index" do
|
||||||
|
get my_index_url
|
||||||
|
value(response).must_be :success?
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should get uploads" do
|
||||||
|
get my_uploads_url
|
||||||
|
value(response).must_be :success?
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue