spec/archivesspace/client_spec.rb in archivesspace-client-0.1.6 vs spec/archivesspace/client_spec.rb in archivesspace-client-0.1.7
- old
+ new
@@ -1,43 +1,39 @@
+# frozen_string_literal: true
+
require 'spec_helper'
describe ArchivesSpace::Client do
-
let(:client) { ArchivesSpace::Client.new }
let(:login) { -> { client.login } }
- describe "Configuration" do
-
+ describe 'Configuration' do
it 'will use the default configuration if none is provided' do
client = ArchivesSpace::Client.new
expect(client.config.base_uri).to eq DEFAULT_BASE_URI
end
it 'will raise an error if supplied configuration is of invalid type' do
- expect{ ArchivesSpace::Client.new({ base_uri: CUSTOM_BASE_URI }) }.to raise_error(RuntimeError)
+ expect { ArchivesSpace::Client.new({ base_uri: CUSTOM_BASE_URI }) }.to raise_error(RuntimeError)
end
it 'will allow a configuration object to be provided' do
client = ArchivesSpace::Client.new(ArchivesSpace::Configuration.new({ base_uri: CUSTOM_BASE_URI }))
expect(client.config.base_uri).to eq CUSTOM_BASE_URI
end
-
end
- describe "Version information" do
-
+ describe 'Version information' do
it 'has a version number' do
expect(ArchivesSpace::Client::VERSION).not_to be nil
end
- it "can retrieve the backend version info" do
+ it 'can retrieve the backend version info' do
VCR.use_cassette('backend_version') do
login.call
- response = client.get "version"
+ response = client.get 'version'
expect(response.status_code).to eq(200)
expect(response.body).to match(/ArchivesSpace \(.*\)/)
end
end
-
end
-
-end
\ No newline at end of file
+end