Skip to content

Commit

Permalink
fixes test that exits everything
Browse files Browse the repository at this point in the history
  • Loading branch information
niquerio committed Jan 25, 2024
1 parent 8c95cdc commit a9ed755
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/aim/student_workers/password_expirer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def run
users_response = @client.get_all(url: "/conf/sets/#{ENV.fetch("STUDENT_USERS_SET_ID")}/members", record_key: "member")
if users_response.status != 200
@logger.error("Unable to retrieve student users set")
exit
raise StandardError, "Unable to retrieve student users set"
end
error_count = 0
@logger.info("Started Expiring Student Worker Account Passwords")
Expand Down
1 change: 0 additions & 1 deletion spec/aim/hathifiles/updater_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
expect(@connection).not_to receive(:update_from_file)
expect { subject.run }.to raise_error(Faraday::ConnectionFailed)
expect(Pathname.new(subject.scratch_dir)).not_to exist
expect(true).to eq(false)
end
end
5 changes: 4 additions & 1 deletion spec/aim/student_workers/password_expirer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
it "exits if the student users set can't be retrieved" do
stub_alma_get_request(url: "conf/sets/#{ENV.fetch("STUDENT_USERS_SET_ID")}/members?limit=100&offset=0", status: 500)
expect(@logger).to receive(:error)
expect(subject).to eq(1)
expect { subject }.to raise_error(StandardError)
end
it "is doing something weird" do
expect(true).to eq(true)
end
end
1 change: 0 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
SimpleCov.start

require File.expand_path "../../lib/aim.rb", __FILE__
puts File.expand_path "../../lib/aim.rb", __FILE__

RSpec.configure do |config|
include AlmaRestClient::Test::Helpers
Expand Down

0 comments on commit a9ed755

Please sign in to comment.