diff options
Diffstat (limited to 'spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb')
-rw-r--r-- | spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb b/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb index a81059518e6..99ee9e58f4e 100644 --- a/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb +++ b/spec/migrations/schedule_update_timelogs_null_spent_at_spec.rb @@ -3,18 +3,18 @@ require 'spec_helper' require_migration! -RSpec.describe ScheduleUpdateTimelogsNullSpentAt do - let_it_be(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') } - let_it_be(:project) { table(:projects).create!(namespace_id: namespace.id) } - let_it_be(:issue) { table(:issues).create!(project_id: project.id) } - let_it_be(:merge_request) { table(:merge_requests).create!(target_project_id: project.id, source_branch: 'master', target_branch: 'feature') } - let_it_be(:timelog1) { create_timelog!(merge_request_id: merge_request.id) } - let_it_be(:timelog2) { create_timelog!(merge_request_id: merge_request.id) } - let_it_be(:timelog3) { create_timelog!(merge_request_id: merge_request.id) } - let_it_be(:timelog4) { create_timelog!(issue_id: issue.id) } - let_it_be(:timelog5) { create_timelog!(issue_id: issue.id) } - - before_all do +RSpec.describe ScheduleUpdateTimelogsNullSpentAt, feature_category: :team_planning do + let!(:namespace) { table(:namespaces).create!(name: 'namespace', path: 'namespace') } + let!(:project) { table(:projects).create!(namespace_id: namespace.id) } + let!(:issue) { table(:issues).create!(project_id: project.id) } + let!(:merge_request) { table(:merge_requests).create!(target_project_id: project.id, source_branch: 'master', target_branch: 'feature') } + let!(:timelog1) { create_timelog!(merge_request_id: merge_request.id) } + let!(:timelog2) { create_timelog!(merge_request_id: merge_request.id) } + let!(:timelog3) { create_timelog!(merge_request_id: merge_request.id) } + let!(:timelog4) { create_timelog!(issue_id: issue.id) } + let!(:timelog5) { create_timelog!(issue_id: issue.id) } + + before do table(:timelogs).where.not(id: timelog3.id).update_all(spent_at: nil) end |