Sha256: 5adca8ddee791e6bd8bad52bc96bd30bca4216023ae45183ce467361e57d4487

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 Bytes

Contents

require 'modulesync'
require 'modulesync/git_service/factory'

describe ModuleSync::GitService::Factory do
  context 'when instantiate a GitHub service without credentials' do
    it 'raises an error' do
      expect { ModuleSync::GitService::Factory.instantiate(type: :github, endpoint: nil, token: nil) }.to raise_error(ModuleSync::GitService::MissingCredentialsError)
    end
  end

  context 'when instantiate a GitLab service without credentials' do
    it 'raises an error' do
      expect { ModuleSync::GitService::Factory.instantiate(type: :gitlab, endpoint: nil, token: nil) }.to raise_error(ModuleSync::GitService::MissingCredentialsError)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
modulesync-2.6.0 spec/unit/modulesync/git_service/factory_spec.rb
modulesync-2.5.0 spec/unit/modulesync/git_service/factory_spec.rb
modulesync-2.4.0 spec/unit/modulesync/git_service/factory_spec.rb
modulesync-2.3.1 spec/unit/modulesync/git_service/factory_spec.rb
modulesync-2.3.0 spec/unit/modulesync/git_service/factory_spec.rb