Moved to test against test env.

This commit is contained in:
Martin Edenhofer 2013-08-04 23:50:08 +02:00
parent f5d699da73
commit 79bd92c71d
2 changed files with 26 additions and 4 deletions

View file

@ -11,19 +11,20 @@ Zammad::Application.configure do
config.serve_static_assets = true config.serve_static_assets = true
config.static_cache_control = "public, max-age=3600" config.static_cache_control = "public, max-age=3600"
config.assets.compress = false
config.assets.compile = true
config.assets.digest = true
# Log error messages when you accidentally call methods on nil # Log error messages when you accidentally call methods on nil
config.whiny_nils = true config.whiny_nils = true
# 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
config.action_controller.perform_caching = false config.action_controller.perform_caching = true
# Raise exceptions instead of rendering exception templates # Raise exceptions instead of rendering exception templates
config.action_dispatch.show_exceptions = false config.action_dispatch.show_exceptions = false
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# Tell Action Mailer not to deliver emails to the real world. # Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the # The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array. # ActionMailer::Base.deliveries array.
@ -34,4 +35,11 @@ Zammad::Application.configure do
# Print deprecation notices to the stderr # Print deprecation notices to the stderr
config.active_support.deprecation = :stderr config.active_support.deprecation = :stderr
# Disable request forgery protection in test environment
config.action_controller.allow_forgery_protection = false
# autoload on
config.dependency_loading = true
end end

View file

@ -9,20 +9,34 @@ while true; do
esac esac
done done
export RAILS_ENV=test
bundle install bundle install
rm -rf tmp/cache/file_store rm -rf tmp/cache/file_store
rm -f public/assets/*.css*
rm -f public/assets/*.js*
#rake assets:precompile
rake db:drop rake db:drop
rake db:create rake db:create
rake db:migrate rake db:migrate
rake db:seed rake db:seed
thin stop
script/websocket-server.rb stop
thin start --threaded -d -p 4444 thin start --threaded -d -p 4444
script/websocket-server.rb start -d
sleep 15 sleep 15
rake test:browser["BROWSER_URL=http://localhost:4444"] rake test:browser["BROWSER_URL=http://localhost:4444"]
script/websocket-server.rb stop
thin stop thin stop
rm -f public/assets/*.css*
rm -f public/assets/*.js*