Sha256: 811c6fa5f5d4fa617adf74fc4c3aab47853059af71c322fd31c322c89d64ae7e

Contents?: true

Size: 757 Bytes

Versions: 10

Compression:

Stored size: 757 Bytes

Contents

require 'spec_helper'

describe Arpa::Repositories::Roles::Remover, type: :repository, slow: true do

  let(:created_role) { create :repository_role }

  before { created_role }

  describe '#destroy' do
    let(:destroy_role) { subject.destroy(created_role) }

    it 'should destroy the role' do
      expect { destroy_role }.to change(Arpa::Repositories::Roles::RepositoryRole, :count).by(-1)
    end

  end

  describe '#disable' do
    let(:disable_role) { subject.disable(created_role) }

    it 'should disable the role' do
      expect { disable_role }.to change(Arpa::Repositories::Roles::RepositoryRole, :count).by(-1)
    end

    it 'role should be setted to removed: true' do
      expect(disable_role.removed).to be_truthy
    end

  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
arpa-0.2.0 spec/lib/arpa/repositories/roles/remover_spec.rb
arpa-0.1.0 spec/lib/arpa/repositories/roles/remover_spec.rb
arpa-0.0.9 spec/lib/arpa/repositories/roles/remover_spec.rb
arpa-0.0.8 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.7 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.6 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.5 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.4 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.3 spec/lib/ar/repositories/roles/remover_spec.rb
arpa-0.0.2 spec/lib/ar/repositories/roles/remover_spec.rb