diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cb2e9ce..b992c73 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -51,7 +51,7 @@ RSpec.configure do |config| end config.before(:example, truncate: true) do - DatabaseCleaner.strategy = :truncation + DatabaseCleaner.strategy = :truncation, { except: %w(achievements) } end config.before(:example) do diff --git a/test/functional/genotypes_controller_test.rb b/test/functional/genotypes_controller_test.rb index 3839c91..4bca6c8 100644 --- a/test/functional/genotypes_controller_test.rb +++ b/test/functional/genotypes_controller_test.rb @@ -42,8 +42,7 @@ class GenotypesControllerTest < ActionController::TestCase activate_authlogic @user = FactoryGirl.create(:user) UserSession.create(@user) - @publishing_award = FactoryGirl. - create(:achievement, award: "Published genotyping") + @publishing_award = Achievement.find_by!(award: 'Published genotyping') end should "see the upload form" do