Skip to content

Commit

Permalink
so its aber
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Jul 29, 2024
1 parent af3def7 commit 2763d61
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions app/helpers/auth_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,4 @@ def find_person_by_auth_user
def devise?
AuthConfig.keycloak? || Rails.env.test?
end

def ptime_available?
ActiveModel::Type::Boolean.new.cast(ENV.fetch('PTIME_API_ACCESSIBLE', true))
end
end
4 changes: 2 additions & 2 deletions spec/helpers/person_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
describe '#fetch_ptime_or_skills_data' do

it 'should send request to ptime api' do
allow(helper).to receive(:ptime_available?).and_return(true)
allow(Skills).to receive(:ptime_available?).and_return(true)
skills_people = helper.fetch_ptime_or_skills_data
expected = [
["Longmax Smith", "/people/new?ptime_employee_id=33"],
Expand All @@ -15,7 +15,7 @@
end

it 'should return people from skills database if last request was right now' do
allow(helper).to receive(:ptime_available?).and_return(false)
allow(Skills).to receive(:ptime_available?).and_return(false)

skills_people = helper.fetch_ptime_or_skills_data
expected = [
Expand Down

0 comments on commit 2763d61

Please sign in to comment.