blob: 49556074278ae67931989f84dc48d1a8248ae1e2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
require 'spec_helper'
describe Banzai::NoteRenderer do
describe '.render' do
it 'renders a Note' do
note = double(:note)
project = double(:project)
wiki = double(:wiki)
user = double(:user)
expect(Banzai::ObjectRenderer).to receive(:new).
with(project, user,
requested_path: 'foo',
project_wiki: wiki,
ref: 'bar').
and_call_original
expect_any_instance_of(Banzai::ObjectRenderer).
to receive(:render).with([note], :note)
described_class.render([note], project, user, 'foo', wiki, 'bar')
end
end
end
|