metamaps--metamaps/spec/models/access_request_spec.rb
2017-02-09 16:53:19 -05:00

24 lines
544 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
RSpec.describe AccessRequest, type: :model do
let(:access_request) { create(:access_request) }
describe 'approve' do
before :each do
access_request.approve
end
it { expect(access_request.approved).to be true }
it { expect(access_request.answered).to be true }
end
describe 'deny' do
before :each do
access_request.deny
end
it { expect(access_request.approved).to be false }
it { expect(access_request.answered).to be true }
end
end