mirror of
https://github.com/discourse/discourse.git
synced 2026-08-14 06:55:03 -05:00
DEV: Use proper wording for contexts in specs
This commit is contained in:
committed by
Loïc Guitaut
parent
02987e05d5
commit
3eaac56797
@@ -1,9 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe RetrieveTitle do
|
||||
|
||||
context "extract_title" do
|
||||
|
||||
describe ".extract_title" do
|
||||
it "will extract the value from the title tag" do
|
||||
title = RetrieveTitle.extract_title(
|
||||
"<html><title>My Cool Title</title></html>"
|
||||
@@ -55,7 +53,7 @@ RSpec.describe RetrieveTitle do
|
||||
end
|
||||
end
|
||||
|
||||
context "crawl" do
|
||||
describe ".crawl" do
|
||||
it "can properly extract a title from a url" do
|
||||
stub_request(:get, "https://brelksdjflaskfj.com/amazing")
|
||||
.to_return(status: 200, body: "<html><title>very amazing</title>")
|
||||
@@ -156,7 +154,7 @@ RSpec.describe RetrieveTitle do
|
||||
end
|
||||
end
|
||||
|
||||
context 'fetch_title' do
|
||||
describe '.fetch_title' do
|
||||
it "does not parse broken title tag" do
|
||||
# webmock does not do chunks
|
||||
stub_request(:get, "https://en.wikipedia.org/wiki/Internet").
|
||||
|
||||
Reference in New Issue
Block a user