mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 13:15:48 +08:00
493d437e79
* Remove outdated option
04078317ba
* Use the non-globally exposed RSpec syntax
https://github.com/rspec/rspec-core/pull/2803
* Use the non-globally exposed RSpec syntax, cont
https://github.com/rspec/rspec-core/pull/2803
* Comply to strict predicate matchers
See:
- https://github.com/rspec/rspec-expectations/pull/1195
- https://github.com/rspec/rspec-expectations/pull/1196
- https://github.com/rspec/rspec-expectations/pull/1277
24 lines
678 B
Ruby
24 lines
678 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe Onebox::Engine::GitlabBlobOnebox do
|
|
before do
|
|
@link = "https://gitlab.com/discourse/onebox/blob/master/lib/onebox/engine/gitlab_blob_onebox.rb"
|
|
|
|
stub_request(:get, "https://gitlab.com/discourse/onebox/raw/master/lib/onebox/engine/gitlab_blob_onebox.rb")
|
|
.to_return(status: 200, body: onebox_response(described_class.onebox_name))
|
|
end
|
|
|
|
include_context "engines"
|
|
it_behaves_like "an engine"
|
|
|
|
describe "#to_html" do
|
|
it "includes file name" do
|
|
expect(html).to include("gitlab_blob_onebox.rb")
|
|
end
|
|
|
|
it "includes blob contents" do
|
|
expect(html).to include("module Onebox")
|
|
end
|
|
end
|
|
end
|