Commit d1d5e238 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve home panel partial code and view specs

parent 1f94b952
......@@ -28,11 +28,11 @@
.project-clone-holder
= render "shared/clone_panel"
- if current_user && can?(current_user, :download_code, @project)
= render 'projects/buttons/download', project: @project, ref: @ref
= render 'projects/buttons/dropdown'
= render 'projects/buttons/koding'
- if current_user
- if can?(current_user, :download_code, @project)
= render 'projects/buttons/download', project: @project, ref: @ref
= render 'projects/buttons/dropdown'
= render 'projects/buttons/koding'
= render 'shared/notifications/button', notification_setting: @notification_setting
= render 'shared/members/access_request_buttons', source: @project
......@@ -15,7 +15,7 @@ describe 'projects/_home_panel', :view do
allow(view).to receive(:can?).and_return(false)
end
context 'user is signed in' do
context 'when user is signed in' do
let(:user) { create(:user) }
it 'makes it possible to set notification level' do
......@@ -26,7 +26,7 @@ describe 'projects/_home_panel', :view do
end
end
context 'user is signed out' do
context 'when user is signed out' do
let(:user) { nil }
it 'is not possible to set notification level' do
......
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