debian-mirror-gitlab/spec/views/shared/projects/_project.html.haml_spec.rb

20 lines
567 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
require 'spec_helper'
describe 'shared/projects/_project.html.haml' do
let(:project) { create(:project) }
it 'should render creator avatar if project has a creator' do
render 'shared/projects/project', use_creator_avatar: true, project: project
expect(rendered).to have_selector('img.avatar')
end
it 'should render a generic avatar if project does not have a creator' do
project.creator = nil
render 'shared/projects/project', use_creator_avatar: true, project: project
expect(rendered).to have_selector('.project-avatar')
end
end