gitlab-org--gitlab-foss/spec/serializers/entity_request_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
482 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2016-10-28 08:32:07 -04:00
require 'spec_helper'
RSpec.describe EntityRequest do
2016-10-28 08:32:07 -04:00
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