Skip to content

Commit

Permalink
rubocopn
Browse files Browse the repository at this point in the history
  • Loading branch information
CygnusOfBalance committed Oct 25, 2024
1 parent 9adbaa8 commit e01e74c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions spec/models/national_hearing_queue_entry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@

context "when appeals have been staged" do
it "refreshes the view and returns the proper appeals", bypass_cleaner: true do

Check failure on line 9 in spec/models/national_hearing_queue_entry_spec.rb

View workflow job for this annotation

GitHub Actions / caseflow_rspec_job (12, 4)

NationalHearingQueueEntry when appeals have been staged refreshes the view and returns the proper appeals Failure/Error: expect(NationalHearingQueueEntry.first.appeal_id).to eq 1 expected: 1 got: 5 (compared using ==)
#refresh in case anything was run in rails console previously
# refresh in case anything was run in rails console previously
NationalHearingQueueEntry.refresh

# AMA
FactoryBot.create(:appeal, :with_schedule_hearing_tasks)
FactoryBot.create(:appeal)
appeal_completed = FactoryBot.create(:appeal, :with_schedule_hearing_tasks)

ScheduleHearingTask.find_by(appeal_id: appeal_completed.id, appeal_type: "Appeal").update(status: 'completed')
ScheduleHearingTask.find_by(appeal_id: appeal_completed.id, appeal_type: "Appeal").update(status: "completed")

# LEGACY
case1 = FactoryBot.create(:case, bfkey: "700230001041", bfcorlid: "100000101011")
Expand All @@ -31,22 +31,22 @@
:with_veteran,
vacols_case: case2)
legacy_appeal_completed = FactoryBot.create(:legacy_appeal,
:with_schedule_hearing_tasks,
:with_veteran,
vacols_case: case3)
:with_schedule_hearing_tasks,
:with_veteran,
vacols_case: case3)

ScheduleHearingTask.find_by(appeal_id: legacy_appeal_completed.id, appeal_type: "LegacyAppeal").update(status: 'completed')
ScheduleHearingTask.find_by(appeal_id: legacy_appeal_completed.id, appeal_type: "LegacyAppeal")
.update(status: "completed")

expect(NationalHearingQueueEntry.count).to eq 0
NationalHearingQueueEntry.refresh

expect(NationalHearingQueueEntry.count).to eq 2
#first created appeal is the only ama appeal that should be in the db (id: 1)
# first created appeal is the only ama appeal that should be in the db (id: 1)
expect(NationalHearingQueueEntry.first.appeal_id).to eq 1
#first created legacy appeal is the only legacy appeal that should be in the db (id: 1)
# first created legacy appeal is the only legacy appeal that should be in the db (id: 1)
expect(NationalHearingQueueEntry.second.appeal_id).to eq 1


clean_up_after_threads
end
end
Expand Down

0 comments on commit e01e74c

Please sign in to comment.