From 660c71c6ce0d6c0805777fa8a82255b1d9090580 Mon Sep 17 00:00:00 2001 From: Salakar Date: Mon, 14 Aug 2017 14:17:14 +0100 Subject: [PATCH] [tests][storage] added ref toString test --- tests/src/tests/storage/storageTests.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/src/tests/storage/storageTests.js b/tests/src/tests/storage/storageTests.js index 531e4f23..cbb86efc 100644 --- a/tests/src/tests/storage/storageTests.js +++ b/tests/src/tests/storage/storageTests.js @@ -1,4 +1,14 @@ -function storageTests({ describe, it, firebase, tryCatch }) { +import RNfirebase from './../../../firebase/firebase'; + +function storageTests({ describe, fdescribe, it, firebase, tryCatch }) { + fdescribe('ref(:path)', () => { + it('toString() should return the correct bucket path to the file', () => { + const app = RNfirebase.app(); + firebase.native.storage().ref('/uploadNope.jpeg').toString() + .should.equal(`gs://${app.options.storageBucket}/uploadNope.jpeg`); + }); + }); + describe('downloadFile()', () => { it('it should error on download file if permission denied', () => { return new Promise((resolve, reject) => {