metamaps--metamaps/spec/models/access_request_spec.rb

26 lines
545 B
Ruby
Raw Permalink Normal View History

2016-12-13 03:28:10 +00:00
# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
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