mirror of
https://github.com/discourse/discourse.git
synced 2025-04-16 21:39:03 +08:00
FIX: Reset the WebMock after before every test
This commit is contained in:
parent
9dddb81cf6
commit
b51126dd5e
@ -18,14 +18,6 @@ describe FinalDestination do
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
before do
|
|
||||||
WebMock.reset!
|
|
||||||
end
|
|
||||||
|
|
||||||
after do
|
|
||||||
WebMock.reset!
|
|
||||||
end
|
|
||||||
|
|
||||||
let(:doc_response) do
|
let(:doc_response) do
|
||||||
{ body: "<html>document</html>",
|
{ body: "<html>document</html>",
|
||||||
headers: { "Content-Type" => "text/html" } }
|
headers: { "Content-Type" => "text/html" } }
|
||||||
|
@ -124,6 +124,7 @@ Spork.prefork do
|
|||||||
Discourse.clear_readonly!
|
Discourse.clear_readonly!
|
||||||
|
|
||||||
I18n.locale = :en
|
I18n.locale = :en
|
||||||
|
WebMock.reset!
|
||||||
end
|
end
|
||||||
|
|
||||||
class TestCurrentUserProvider < Auth::DefaultCurrentUserProvider
|
class TestCurrentUserProvider < Auth::DefaultCurrentUserProvider
|
||||||
|
Loading…
x
Reference in New Issue
Block a user