mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
It's very easy to forget to add `require 'rails_helper'` at the top of every core/plugin spec file, and omissions can cause some very confusing/sporadic errors. By setting this flag in `.rspec`, we can remove the need for `require 'rails_helper'` entirely.
32 lines
861 B
Ruby
32 lines
861 B
Ruby
# frozen_string_literal: true
|
|
|
|
describe Onebox::Engine::GooglePlayAppOnebox do
|
|
before do
|
|
@link = "https://play.google.com/store/apps/details?id=com.hulu.plus&hl=en"
|
|
|
|
stub_request(:get, "https://play.google.com/store/apps/details?id=com.hulu.plus&hl=en")
|
|
.to_return(status: 200, body: onebox_response("googleplayapp"))
|
|
end
|
|
|
|
include_context "engines"
|
|
it_behaves_like "an engine"
|
|
|
|
describe "#to_html" do
|
|
it "has title" do
|
|
expect(html).to include("Hulu: Stream TV, Movies & more")
|
|
end
|
|
|
|
it "has image" do
|
|
expect(html).to include("4iScc4heC5Cog-i-es2hIYe0RuewYTkGiJfHAaXv0Kb2Q5b2qpbYWxWiooAPuUEhpg")
|
|
end
|
|
|
|
it "has description" do
|
|
expect(html).to include("Enjoy all your TV in one place with a new Hulu experience")
|
|
end
|
|
|
|
it "has price" do
|
|
expect(html).to include("Free")
|
|
end
|
|
end
|
|
end
|