|
3 | 3 | require 'rails_helper' |
4 | 4 |
|
5 | 5 | RSpec.describe 'Downloading an object' do |
6 | | - before do |
7 | | - allow_any_instance_of(StacksFile).to receive(:path).and_return(Rails.root.join('Gemfile')) |
8 | | - end |
9 | | - |
10 | 6 | let(:connection) { instance_double(Faraday::Connection) } |
11 | 7 |
|
12 | 8 | context 'when not logged in' do |
|
37 | 33 | 'access' => { |
38 | 34 | 'view' => 'world', |
39 | 35 | 'download' => 'world' |
40 | | - } |
| 36 | + }, |
| 37 | + "hasMessageDigests" => [ |
| 38 | + { |
| 39 | + "type" => "sha1", |
| 40 | + "digest" => "aca42a32c00df5eadca47d01eabed4dad4768329" |
| 41 | + }, |
| 42 | + { |
| 43 | + "type" => "md5", |
| 44 | + "digest" => "fdcb37ed3daeef288ce9b512cada6ded" |
| 45 | + } |
| 46 | + ] |
41 | 47 | }, |
42 | 48 | { |
43 | 49 | 'filename' => '36105116040556_0002.xml', |
44 | 50 | 'access' => { |
45 | 51 | 'view' => 'world', |
46 | 52 | 'download' => 'world' |
47 | | - } |
| 53 | + }, |
| 54 | + "hasMessageDigests" => [ |
| 55 | + { |
| 56 | + "type" => "sha1", |
| 57 | + "digest" => "39a893f0592708ea39bb8a3321f7ab3185b86c42" |
| 58 | + }, |
| 59 | + { |
| 60 | + "type" => "md5", |
| 61 | + "digest" => "bae4ac9f1a8aba1482bfb5f937338391" |
| 62 | + } |
| 63 | + ] |
48 | 64 | }, |
49 | 65 | { |
50 | 66 | 'filename' => '36105116040556_0002.jp2', |
51 | 67 | 'access' => { |
52 | 68 | 'view' => 'world', |
53 | 69 | 'download' => 'world' |
54 | | - } |
| 70 | + }, |
| 71 | + "hasMessageDigests" => [ |
| 72 | + { |
| 73 | + "type" => "sha1", |
| 74 | + "digest" => "4285af92179f807a5f41a1d615c9fafd705097ac" |
| 75 | + }, |
| 76 | + { |
| 77 | + "type" => "md5", |
| 78 | + "digest" => "3b8ecfb3b5a5ec9bfcfb9d85b88394bc" |
| 79 | + } |
| 80 | + ] |
55 | 81 | } |
56 | 82 | ] |
57 | 83 | } |
|
64 | 90 | 'access' => { |
65 | 91 | 'view' => 'world', |
66 | 92 | 'download' => 'world' |
67 | | - } |
| 93 | + }, |
| 94 | + "hasMessageDigests" => [ |
| 95 | + { |
| 96 | + "type" => "sha1", |
| 97 | + "digest" => "a8e9a51ef67c8bdeec28270b3bd1563b9c830448" |
| 98 | + }, |
| 99 | + { |
| 100 | + "type" => "md5", |
| 101 | + "digest" => "a9270cbc4e5b96d3bd16ad00767632a5" |
| 102 | + } |
| 103 | + ] |
68 | 104 | }, |
69 | 105 | { |
70 | 106 | 'filename' => '36105116040556_0003.xml', |
71 | 107 | 'access' => { |
72 | 108 | 'view' => 'world', |
73 | 109 | 'download' => 'world' |
74 | | - } |
| 110 | + }, |
| 111 | + "hasMessageDigests" => [ |
| 112 | + { |
| 113 | + "type" => "sha1", |
| 114 | + "digest" => "adfb92fe77712cfeab137e040040753b8de6af7e" |
| 115 | + }, |
| 116 | + { |
| 117 | + "type" => "md5", |
| 118 | + "digest" => "cb91c2874bc066f521dafb82ee55a0c8" |
| 119 | + } |
| 120 | + ] |
75 | 121 | }, |
76 | 122 | { |
77 | 123 | 'filename' => '36105116040556_0003.jp2', |
78 | 124 | 'access' => { |
79 | 125 | 'view' => 'world', |
80 | 126 | 'download' => 'world' |
81 | | - } |
| 127 | + }, |
| 128 | + "hasMessageDigests" => [ |
| 129 | + { |
| 130 | + "type" => "sha1", |
| 131 | + "digest" => "76c17fab28eeb58c4763a790a28eea3e65659582" |
| 132 | + }, |
| 133 | + { |
| 134 | + "type" => "md5", |
| 135 | + "digest" => "ef4ecbc6b55cc6beb93857ff423b6930" |
| 136 | + } |
| 137 | + ] |
82 | 138 | } |
83 | 139 | ] |
84 | 140 | } |
|
182 | 238 | 'access' => { |
183 | 239 | 'view' => 'stanford', |
184 | 240 | 'download' => 'stanford' |
185 | | - } |
| 241 | + }, |
| 242 | + "hasMessageDigests" => [ |
| 243 | + { |
| 244 | + "type" => "sha1", |
| 245 | + "digest" => "b9174fd20be391b82b64981c92a58cb6865a7089" |
| 246 | + }, |
| 247 | + { |
| 248 | + "type" => "md5", |
| 249 | + "digest" => "edcd7c37acde6f64a4e6a2735f478daf" |
| 250 | + } |
| 251 | + ] |
186 | 252 | }, |
187 | 253 | { |
188 | 254 | 'filename' => 'bb142ws0723_01_thumb.jp2', |
189 | 255 | 'access' => { |
190 | 256 | 'view' => 'stanford', |
191 | 257 | 'download' => 'stanford' |
192 | | - } |
| 258 | + }, |
| 259 | + "hasMessageDigests" => [ |
| 260 | + { |
| 261 | + "type" => "sha1", |
| 262 | + "digest" => "05089813ddf83f70bf059eaf321bf53e0ec55f66" |
| 263 | + }, |
| 264 | + { |
| 265 | + "type" => "md5", |
| 266 | + "digest" => "13e25faa7061023648611ad10cc304cc" |
| 267 | + } |
| 268 | + ] |
193 | 269 | } |
194 | 270 | ] |
195 | 271 | } |
|
202 | 278 | 'access' => { |
203 | 279 | 'view' => 'world', |
204 | 280 | 'download' => 'world' |
205 | | - } |
| 281 | + }, |
| 282 | + "hasMessageDigests" => [ |
| 283 | + { |
| 284 | + "type" => "sha1", |
| 285 | + "digest" => "bd6f715d3d086f102e9ed7fe2dc1ba2f78add828" |
| 286 | + }, |
| 287 | + { |
| 288 | + "type" => "md5", |
| 289 | + "digest" => "be2d92be8f76906020e7918988bd26b2" |
| 290 | + } |
| 291 | + ] |
206 | 292 | } |
207 | 293 | ] |
208 | 294 | } |
|
0 commit comments