Add regression test.
This commit is contained in:
parent
37ce5f312e
commit
18b17072c6
1 changed files with 14 additions and 1 deletions
|
@ -125,6 +125,19 @@ describe Note, models: true do
|
|||
let(:set_mentionable_text) { ->(txt) { subject.note = txt } }
|
||||
end
|
||||
|
||||
describe "#all_references" do
|
||||
let!(:note1) { create(:note) }
|
||||
let!(:note2) { create(:note) }
|
||||
|
||||
it "reads the rendered note body from the cache" do
|
||||
expect(Banzai::Renderer).to receive(:render).with(note1.note, pipeline: :note, cache_key: [note1, "note"], project: note1.project)
|
||||
expect(Banzai::Renderer).to receive(:render).with(note2.note, pipeline: :note, cache_key: [note2, "note"], project: note2.project)
|
||||
|
||||
note1.all_references
|
||||
note2.all_references
|
||||
end
|
||||
end
|
||||
|
||||
describe :search do
|
||||
let!(:note) { create(:note, note: "WoW") }
|
||||
|
||||
|
|
Loading…
Reference in a new issue