Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/models/alma/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def add_note(text)
'user_viewable' => false,
'popup_note' => false,
'created_by' => 'Framework',
'created_date' => Time.zone.now.strftime('%Y-%m-%dT%H:%M:00Z'),
'created_date' => Time.now.utc.strftime('%Y-%m-%dT%H:%M:00Z'),
'segment_type' => 'Internal'
}
user_obj['user_note'].push(new_note)
Expand Down
5 changes: 2 additions & 3 deletions spec/jobs_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
include_context 'ssh'
let(:job) { described_class }
let(:alma_api_key) { 'totally-fake-key' }
let(:today) { Time.now.strftime('%Y%m%d') }
let(:today) { Time.now.utc.strftime('%Y%m%d') }
let(:expected_note) { "#{today} #{note_text} [litscript]" }

attr_reader :patron
Expand Down Expand Up @@ -57,13 +57,12 @@

before do
allow(Rails.application.config).to receive(:alma_api_key).and_return(alma_api_key)

stub_patron_dump(patron_id)
@patron = Alma::User.find(patron_id)
end

describe 'success' do
let(:today) { Time.now.strftime('%Y%m%d') }
let(:today) { Time.now.utc.strftime('%Y%m%d') }
let(:expected_note) { "#{today} #{note_text} [litscript]" }

it 'adds the expected note' do # rubocop:disable RSpec/NoExpectationExample
Expand Down