Sha256: 393447a61ddf78a3e8b4137de3fa07ba85d8852e4f77953adc36229135b147cb

Contents?: true

Size: 957 Bytes

Versions: 13

Compression:

Stored size: 957 Bytes

Contents

require 'spec_helper'

describe ContributorAgreement do
  subject { ContributorAgreement.new(curation_concern, user, params) }
  let(:curation_concern) { GenericWork.new }
  let(:user) { User.new }
  let(:params) { {} }


  it 'has acceptance value' do
    subject.acceptance_value.should == 'accept'
  end

  it 'has param key' do
    subject.param_key.should == :accept_contributor_agreement
  end

  describe 'without acceptance' do
    let(:params) { {} }

    it 'has param value' do
      subject.param_value.should == nil
    end

    it 'is most definitely not being accepted' do
      subject.is_being_accepted?.should == false
    end
  end

  describe 'with acceptance' do
    let(:params) { {accept_contributor_agreement: 'accept'} }

    it 'has a param value of "accept"' do
      subject.param_value.should == 'accept'
    end

    it 'is in the process of being accepted' do
      subject.is_being_accepted?.should == true
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
curate-0.6.6 spec/models/contributor_agreement_spec.rb
curate-0.6.5 spec/models/contributor_agreement_spec.rb
curate-0.6.4 spec/models/contributor_agreement_spec.rb
curate-0.6.3 spec/models/contributor_agreement_spec.rb
curate-0.6.1 spec/models/contributor_agreement_spec.rb
curate-0.6.0 spec/models/contributor_agreement_spec.rb
curate-0.5.6 spec/models/contributor_agreement_spec.rb
curate-0.5.5 spec/models/contributor_agreement_spec.rb
curate-0.5.4 spec/models/contributor_agreement_spec.rb
curate-0.5.2 spec/models/contributor_agreement_spec.rb
curate-0.5.1 spec/models/contributor_agreement_spec.rb
curate-0.5.0 spec/models/contributor_agreement_spec.rb
curate-0.4.2 spec/models/contributor_agreement_spec.rb