-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ios): updated Ti.Blob.toString() behaviour to original (#11421)
Fixes TIMOB-27350
- Loading branch information
1 parent
4b8b22a
commit cbb82a6
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Appcelerator Titanium Mobile | ||
* Copyright (c) 2011-Present by Appcelerator, Inc. All Rights Reserved. | ||
* Licensed under the terms of the Apache Public License | ||
* Please see the LICENSE included with this distribution for details. | ||
*/ | ||
/* eslint-env mocha */ | ||
/* eslint no-unused-expressions: "off" */ | ||
'use strict'; | ||
const should = require('./utilities/assertions'); | ||
|
||
describe('Titanium.Blob', function () { | ||
describe('#toString()', function () { | ||
it('binary content', function () { | ||
const blob = Ti.Filesystem.getFile('SmallLogo.png').read(); | ||
should(blob.toString()).eql('[object TiBlob]'); | ||
}); | ||
|
||
it('empty string', function () { | ||
const blob = Ti.createBuffer({ value: '' }).toBlob(); | ||
should(blob.toString()).eql(''); | ||
}); | ||
|
||
it('text content', function () { | ||
const blob = Ti.createBuffer({ value: 'test toString()' }).toBlob(); | ||
should(blob.toString()).eql('test toString()'); | ||
}); | ||
|
||
}); | ||
}); |