diff options
author | Mario de la Ossa <mariodelaossa@gmail.com> | 2017-12-19 08:14:08 +0300 |
---|---|---|
committer | Mario de la Ossa <mariodelaossa@gmail.com> | 2017-12-19 08:18:23 +0300 |
commit | d02059ddf3fef105a8e835024b589d9eac2140f0 (patch) | |
tree | ae854ac277d736fd23532fc54e2c46ecee2c0fbc /spec | |
parent | b03789395c59ce94c8bdb4e0f4806c8cd7705f46 (diff) |
BlobViewer::PackageJson - if private link to homepage
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/blob_viewer/package_json_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/models/blob_viewer/package_json_spec.rb b/spec/models/blob_viewer/package_json_spec.rb index 339d4e9e644..5ed2f4400bc 100644 --- a/spec/models/blob_viewer/package_json_spec.rb +++ b/spec/models/blob_viewer/package_json_spec.rb @@ -45,7 +45,8 @@ describe BlobViewer::PackageJson do { "name": "module-name", "version": "10.3.1", - "private": true + "private": true, + "homepage": "myawesomepackage.com" } SPEC end @@ -53,10 +54,10 @@ describe BlobViewer::PackageJson do subject { described_class.new(blob) } describe '#package_url' do - it 'returns nil' do + it 'returns homepage if any' do expect(subject).to receive(:prepare!) - expect(subject.package_url).to be_nil + expect(subject.package_url).to eq('myawesomepackage.com') end end |