Sha256: 4ba43b5a8c589859b0ef845945cbc57b43bef8bf8966f7139c3735a789c78fc3
Contents?: true
Size: 852 Bytes
Versions: 8
Compression:
Stored size: 852 Bytes
Contents
require 'test_controller' class DatabasesControllerTest < TestController tests DatabasesController setup do @routes = Ecrire::Onboarding::Engine.routes end test 'show error if the connection is refused' do post :create, database: {user: 'invalid!', password: 'Nothing', name: 'ecrire_test'} assert_response :success assert_select 'div.error' do assert_select 'p', 1 end end test 'even if the connection to the server is done, secrets.yml is not yet generated' do post :create, database: {user: 'postgres', password: '', name: 'ecrire_test'} assert Rails.application.paths['config/secrets'].existent.empty? end test 'redirect to users if the connection is successful' do post :create, database: {user: 'postgres', password: '', name: 'ecrire_test'} assert_redirected_to '/users' end end
Version data entries
8 entries across 8 versions & 1 rubygems