mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
fix running tests
This commit is contained in:
parent
d74790e3da
commit
f9837747f6
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RAILS_ENV='test' bin/rails db:environment:set
|
||||
RAILS_ENV='test' rake db:drop
|
||||
RAILS_ENV='test' rake db:create
|
||||
RAILS_ENV='test' rake db:migrate
|
||||
RAILS_ENV='test' bundle exec rake test "$@"
|
||||
RAILS_ENV='test' bin/rails db:drop
|
||||
RAILS_ENV='test' bin/rails db:create
|
||||
RAILS_ENV='test' bin/rails db:migrate
|
||||
RAILS_ENV='test' bundle exec bin/rails test "$@"
|
||||
|
@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'test_helper'
|
||||
|
||||
class AbusesTest < ActionDispatch::IntegrationTest
|
||||
# Called before every test method runs. Can be used
|
||||
# to set up fixture information.
|
||||
|
@ -2,7 +2,7 @@ require 'test_helper'
|
||||
|
||||
class PriceCategoryTest < ActiveSupport::TestCase
|
||||
test 'price category name must be unique' do
|
||||
pc = PriceCategory.new({name: '- DE 25 ANS', conditions: 'Tarif préférentiel pour les jeunes'})
|
||||
pc = PriceCategory.new(name: '- DE 25 ANS', conditions: 'Tarif préférentiel pour les jeunes')
|
||||
assert pc.invalid?
|
||||
assert pc.errors[:name].present?
|
||||
end
|
||||
|
@ -5,6 +5,7 @@ Coveralls.wear!('rails')
|
||||
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
require File.expand_path('../config/environment', __dir__)
|
||||
require 'action_dispatch'
|
||||
require 'rails/test_help'
|
||||
require 'vcr'
|
||||
require 'sidekiq/testing'
|
||||
|
Loading…
x
Reference in New Issue
Block a user