Skip to content

Commit c46b25e

Browse files
Tweak full time check
1 parent 849ec5c commit c46b25e

File tree

2 files changed

+1
-19
lines changed

2 files changed

+1
-19
lines changed

lib/ucpath/jobs.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ def valid_org_relationship?(j)
106106

107107
# 4. The job will be ineligible if the percentage of full time is zero
108108
def positive_full_time?(j)
109-
percent_fulltime =
110-
if j.respond_to?(:percent_of_fulltime)
111-
j.percent_of_fulltime.to_f
112-
else
113-
0.0
114-
end
115-
116-
percent_fulltime.positive?
109+
j.percent_of_fulltime.to_f.positive?
117110
end
118111

119112
def find_priority_jobs(job_list)

spec/lib/ucpath_spec.rb

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -752,17 +752,6 @@ def eligible(job)
752752
expect(eligible(job)).to be(true)
753753
end
754754
end
755-
756-
context 'when percent_of_fulltime does not exist' do
757-
let(:job_without_percent) do
758-
Struct.new(:hr_status_code, :expected_end_date, :org_relationship_code, :job_code)
759-
.new('A', '', '', 'ANY')
760-
end
761-
762-
it 'returns false' do
763-
expect(eligible(job_without_percent)).to be(false)
764-
end
765-
end
766755
end
767756
end
768757
# rubocop:enable Metrics/BlockLength

0 commit comments

Comments
 (0)