blob: ac687f68ef61237e8ec77c285b88c1f5a36969cc (
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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'groups/show', feature_category: :subgroups do
describe 'group README' do
let_it_be(:group) { build_stubbed(:group) }
let_it_be(:readme_project) { build_stubbed(:project, :readme) }
before do
assign(:group, group)
end
context 'with readme project' do
before do
allow(group).to receive(:group_readme).and_return(readme_project)
end
it 'renders #js-group-readme' do
render
expect(rendered).to have_selector('#js-group-readme')
end
end
context 'without readme project' do
before do
allow(group).to receive(:group_readme).and_return(nil)
end
it 'does not render #js-group-readme' do
render
expect(rendered).not_to have_selector('#js-group-readme')
end
end
end
end
|