| Conditions | 1 |
| Total Lines | 23 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # pylint: disable=unused-variable,expression-not-assigned,line-too-long |
||
| 6 | def describe_custom(): |
||
| 7 | |||
| 8 | def it_selects_image_from_query_param(client): |
||
| 9 | response = client.get("/custom?image=http://www.gstatic.com/webp/gallery/2.jpg") |
||
| 10 | |||
| 11 | expect(response.status_code) == 200 |
||
| 12 | expect(response.mimetype) == 'text/html' |
||
| 13 | |||
| 14 | html = response.get_data(as_text=True) |
||
| 15 | |||
| 16 | expect(html).contains("$('#meme-font').val('titilliumweb-black');") |
||
| 17 | expect(html).contains("$('#meme-background').val('http://www.gstatic.com/webp/gallery/2.jpg');") |
||
| 18 | |||
| 19 | def it_selects_font_from_query_param(client): |
||
| 20 | response = client.get("/custom?font=impact") |
||
| 21 | |||
| 22 | expect(response.status_code) == 200 |
||
| 23 | expect(response.mimetype) == 'text/html' |
||
| 24 | |||
| 25 | html = response.get_data(as_text=True) |
||
| 26 | |||
| 27 | expect(html).contains("$('#meme-font').val('impact');") |
||
| 28 | expect(html).contains("$('#meme-background').val('https://raw.githubusercontent.com/jacebrowning/memegen/master/memegen/static/images/missing.png');") |
||
| 29 |