diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-21 17:31:49 +0300 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-12-21 17:31:49 +0300 |
commit | e072a2740e4b4112830f16f061704a88d5a9cabb (patch) | |
tree | e0bfd9e6448d2fa5f9f176054051fb58a06e663d /spec/serializers/request_aware_entity_spec.rb | |
parent | 468b47d47c004f7a7a2eef7dace2a0b808df9175 (diff) |
Add missing specs for request aware entity module
[ci skip]
Diffstat (limited to 'spec/serializers/request_aware_entity_spec.rb')
-rw-r--r-- | spec/serializers/request_aware_entity_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/serializers/request_aware_entity_spec.rb b/spec/serializers/request_aware_entity_spec.rb new file mode 100644 index 00000000000..ac23497fad9 --- /dev/null +++ b/spec/serializers/request_aware_entity_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe RequestAwareEntity do + subject do + Class.new.include(described_class).new + end + + it 'includes URL helpers' do + expect(subject).to respond_to(:namespace_project_path) + end + + it 'includes method for checking abilities' do + expect(subject).to respond_to(:can?) + end + + it 'fetches request from options' do + expect(subject).to receive(:options) + .and_return({request: 'some value'}) + + expect(subject.request).to eq 'some value' + end +end |