mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 20:24:47 +08:00
PERF: Speed up slow tests in our test suite.
Before ``` Finished in 7 minutes 23 seconds (files took 4.15 seconds to load) 7145 examples, 0 failures, 10 pending ``` After ``` Finished in 6 minutes 12 seconds (files took 4.41 seconds to load) 7145 examples, 0 failures, 10 pending ```
This commit is contained in:
@ -48,12 +48,11 @@ describe Admin::SiteTextsController do
|
||||
|
||||
describe 'failure' do
|
||||
before do
|
||||
TranslationOverride.any_instance.expects(:lookup_original_text)
|
||||
.returns('%{first} %{second}')
|
||||
I18n.backend.store_translations(:en, some_key: '%{first} %{second}')
|
||||
end
|
||||
|
||||
it 'returns the right error message' do
|
||||
xhr :put, :update, id: 'title', site_text: { value: 'hello %{key}' }
|
||||
xhr :put, :update, id: 'some_key', site_text: { value: 'hello %{key}' }
|
||||
|
||||
expect(response.status).to eq(422)
|
||||
|
||||
|
Reference in New Issue
Block a user