2019-12-21 20:55:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-07-28 23:09:34 +05:30
|
|
|
RSpec.describe EntityRequest do
|
2017-08-17 22:00:37 +05:30
|
|
|
subject do
|
|
|
|
described_class.new(user: 'user', project: 'some project')
|
|
|
|
end
|
|
|
|
|
|
|
|
describe 'methods created' do
|
|
|
|
it 'defines accessible attributes' do
|
|
|
|
expect(subject.user).to eq 'user'
|
|
|
|
expect(subject.project).to eq 'some project'
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'raises error when attribute is not defined' do
|
|
|
|
expect { subject.some_method }.to raise_error NoMethodError
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|