Adding jasmine coverage for oEmbed updates
This commit is contained in:
parent
60024d7e20
commit
e8decc200e
2 changed files with 19 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"}}});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue