Skip to content

Commit 251117e

Browse files
committed
test(storage, android): emulator now throws on fetch of read-only file
1 parent abccc65 commit 251117e

File tree

1 file changed

+10
-15
lines changed

1 file changed

+10
-15
lines changed

packages/storage/e2e/StorageReference.e2e.js

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -168,23 +168,18 @@ describe('storage() -> StorageReference', function () {
168168
}
169169
});
170170

171-
// Not throwing against the storage emulator on android?
172171
it('throws error if no read permission', async function () {
173-
if (device.getPlatform() === 'ios') {
174-
const storageReference = firebase.storage().ref(WRITE_ONLY_NAME);
172+
const storageReference = firebase.storage().ref(WRITE_ONLY_NAME);
175173

176-
try {
177-
await storageReference.getDownloadURL();
178-
return Promise.reject(new Error('Did not throw'));
179-
} catch (error) {
180-
error.code.should.equal('storage/unauthorized');
181-
error.message.should.equal(
182-
'[storage/unauthorized] User is not authorized to perform the desired action.',
183-
);
184-
return Promise.resolve();
185-
}
186-
} else {
187-
this.skip();
174+
try {
175+
await storageReference.getDownloadURL();
176+
return Promise.reject(new Error('Did not throw'));
177+
} catch (error) {
178+
error.code.should.equal('storage/unauthorized');
179+
error.message.should.equal(
180+
'[storage/unauthorized] User is not authorized to perform the desired action.',
181+
);
182+
return Promise.resolve();
188183
}
189184
});
190185
});

0 commit comments

Comments
 (0)