Commit d431623b authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

WikiPage#historical? not to depend on global repo

During testing, the `let_it_be` at the top of the WikiPage spec file
does not reset the repository between runs. That means tests depend on
global state. This change fixed this for one test not to inflate the
diff and to speed up review.
parent 5a1a2487
......@@ -773,8 +773,11 @@ RSpec.describe WikiPage do
end
describe '#historical?' do
include_context 'subject is persisted page'
let!(:container) { create(:project) }
subject { create_wiki_page }
let(:wiki) { subject.wiki }
let(:old_version) { subject.versions.last.id }
let(:old_page) { wiki.find_page(subject.title, old_version) }
let(:latest_version) { subject.versions.first.id }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment