1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-09-12 04:51:50 +03:00

Update UTs

This commit is contained in:
David Baker
2015-11-12 12:05:06 +00:00
parent 7095753410
commit f74bb3c145

View File

@@ -10,9 +10,16 @@ describe("ContentRepo", function() {
});
describe("getHttpUriForMxc", function() {
it("should do nothing to HTTP URLs", function() {
it("should do nothing to HTTP URLs when allowing direct links", function() {
var httpUrl = "http://example.com/image.jpeg";
expect(ContentRepo.getHttpUriForMxc(baseUrl, httpUrl)).toEqual(httpUrl);
expect(
ContentRepo.getHttpUriForMxc(baseUrl, httpUrl, undefined, undefined, undefined, true)
).toEqual(httpUrl);
});
it("should return the empty string HTTP URLs by default", function() {
var httpUrl = "http://example.com/image.jpeg";
expect(ContentRepo.getHttpUriForMxc(baseUrl, httpUrl)).toEqual('');
});
it("should return a download URL if no width/height/resize are specified",
@@ -23,8 +30,8 @@ describe("ContentRepo", function() {
);
});
it("should do nothing for null input", function() {
expect(ContentRepo.getHttpUriForMxc(null)).toEqual(null);
it("should return the empty string for null input", function() {
expect(ContentRepo.getHttpUriForMxc(null)).toEqual('');
});
it("should return a thumbnail URL if a width/height/resize is specified",