Fix failing tests

This commit is contained in:
Mojca Lorber 2019-02-13 14:31:26 +01:00
parent 16f99afbc0
commit 0adb8b2b61
2 changed files with 4 additions and 0 deletions

View file

@ -35,6 +35,7 @@ class Team < ApplicationRecord
has_many :repositories, dependent: :destroy
has_many :reports, inverse_of: :team, dependent: :destroy
attr_accessor :without_intro_demo
after_create :generate_intro_demo
def default_view_state
@ -312,6 +313,8 @@ class Team < ApplicationRecord
include FirstTimeDataGenerator
def generate_intro_demo
return if without_intro_demo
user = User.find(created_by_id)
if user.created_teams.order(:created_at).first == self
seed_demo_data(user, self)

View file

@ -6,5 +6,6 @@ FactoryBot.define do
sequence(:name) { |n| "My team-#{n}" }
description { Faker::Lorem.sentence }
space_taken { 1048576 }
without_intro_demo true
end
end