summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwinniehell <git@winniehell.de>2016-08-24 02:18:38 +0200
committerwinniehell <git@winniehell.de>2016-08-24 02:18:38 +0200
commit75d48ae35bcdb8bfc0a6f661de32718710082856 (patch)
tree8ce18368921272faf7e7608f67725545047d9922
parent02591b043052eb4f8041f8cf51546fab272d7b61 (diff)
downloadgitlab-ce-75d48ae35bcdb8bfc0a6f661de32718710082856.tar.gz
Add failing test for #21334
-rw-r--r--spec/lib/extracts_path_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/extracts_path_spec.rb b/spec/lib/extracts_path_spec.rb
index 86d04ecfa36..e10c1f5c547 100644
--- a/spec/lib/extracts_path_spec.rb
+++ b/spec/lib/extracts_path_spec.rb
@@ -51,6 +51,16 @@ describe ExtractsPath, lib: true do
expect(@path).to eq(params[:path])
end
end
+
+ context 'subclass overrides get_id' do
+ it 'uses ref returned by get_id' do
+ allow_any_instance_of(self.class).to receive(:get_id){ '38008cb17ce1466d8fec2dfa6f6ab8dcfe5cf49e' }
+
+ assign_ref_vars
+
+ expect(@id).to eq(get_id)
+ end
+ end
end
describe '#extract_ref' do