Clear cache before running test

pull/1006/head
Rick Carlino 2018-10-08 09:40:46 -05:00
parent ba09350964
commit 72c4df8ebb
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,21 @@
#!/bin/sh
sudo docker-compose run web npm run tslint &
P1=$!
sudo docker-compose run web npm run sass-lint &
P2=$!
sudo docker-compose run web npm run typecheck &
P3=$!
sudo docker-compose run web rspec spec &
P4=$!
sudo docker-compose run web npm run test-slow &
P5=$!
sudo docker-compose run web npm run coverage &
P6=$!
wait $P1 $P2 $P3 $P4 $P5 $P6

View File

@ -7,6 +7,7 @@ describe Devices::Dump do
NOPE = "Expected value[%s] to equal %s. Got %s instead"
it "serializes _all_ the data", :slow do
Rails.cache.clear
device = FactoryBot.create(:device)
resources = MODEL_NAMES
.map { |x| x.to_s.singularize.to_sym }
@ -47,7 +48,7 @@ describe Devices::Dump do
expect(results[:export_created_at]).to be
export_time = Time.parse(results[:export_created_at])
today = Time.now
expect(today - export_time).to be < 1
expect(today - export_time.round).to be < 1
expect(results[:database_schema])
.to eq(ActiveRecord::Migrator.current_version)
expect(results[:server_url]).to eq($API_URL)