diff --git a/Changelog.md b/Changelog.md index 2662f78cbcf16299307e8a964cca02bbc5a13ad6..855f1539bb012b56b0387db9371021378d80536e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,7 @@ ## Features +* Updates to oEmbed, added new providers and fixed photo display. [#3880](https://github.com/diaspora/diaspora/pull/3880) * Add 'screenshot tool' for taking before/after images of stylesheet changes. [#3797](https://github.com/diaspora/diaspora/pull/3797) * Add possibility to contact the administrator. [#3792](https://github.com/diaspora/diaspora/pull/3792) * Add simple background for unread messages/conversations mobile. [#3724](https://github.com/diaspora/diaspora/pull/3724) diff --git a/spec/javascripts/app/views/oembed_view_spec.js b/spec/javascripts/app/views/oembed_view_spec.js index 6b635910b902aba00fd211afd22fad15b7621891..7af824d2078acd7ebb2ebef3b5e2e79f4ad8ea5e 100644 --- a/spec/javascripts/app/views/oembed_view_spec.js +++ b/spec/javascripts/app/views/oembed_view_spec.js @@ -13,7 +13,23 @@ describe("app.views.OEmbed", function(){ }); describe("rendering", function(){ - context("with thumb", function() { + + it("should set types on the data", function() { + this.view.render(); + expect(this.view.model.get("o_embed_cache").data.types).toBeDefined(); + }); + + context("is a video", function() { + + beforeEach(function(){ + this.statusMessage.set({"o_embed_cache" : {"data": {"html": "some html","thumbnail_url": "//example.com/thumb.jpg","type": "video"}}}); + }); + + it("should set types.video on the data", function() { + this.view.render(); + expect(this.view.model.get("o_embed_cache").data.types.video).toBe(true) + }); + it("shows the thumb with overlay", function(){ this.view.render(); @@ -31,7 +47,7 @@ describe("app.views.OEmbed", function(){ }); }); - context("no thumb", function() { + context("is not a video", function() { beforeEach(function(){ this.statusMessage.set({"o_embed_cache" : {"data": {"html": "some html"}}}); });