Improve home panel partial code and view specs
This commit is contained in:
parent
1f94b952b5
commit
d1d5e2388d
2 changed files with 7 additions and 7 deletions
|
@ -28,11 +28,11 @@
|
||||||
.project-clone-holder
|
.project-clone-holder
|
||||||
= render "shared/clone_panel"
|
= render "shared/clone_panel"
|
||||||
|
|
||||||
- if current_user && can?(current_user, :download_code, @project)
|
- if current_user
|
||||||
|
- if can?(current_user, :download_code, @project)
|
||||||
= render 'projects/buttons/download', project: @project, ref: @ref
|
= render 'projects/buttons/download', project: @project, ref: @ref
|
||||||
= render 'projects/buttons/dropdown'
|
= render 'projects/buttons/dropdown'
|
||||||
= render 'projects/buttons/koding'
|
= render 'projects/buttons/koding'
|
||||||
|
|
||||||
- if current_user
|
|
||||||
= render 'shared/notifications/button', notification_setting: @notification_setting
|
= render 'shared/notifications/button', notification_setting: @notification_setting
|
||||||
= render 'shared/members/access_request_buttons', source: @project
|
= 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)
|
allow(view).to receive(:can?).and_return(false)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'user is signed in' do
|
context 'when user is signed in' do
|
||||||
let(:user) { create(:user) }
|
let(:user) { create(:user) }
|
||||||
|
|
||||||
it 'makes it possible to set notification level' do
|
it 'makes it possible to set notification level' do
|
||||||
|
@ -26,7 +26,7 @@ describe 'projects/_home_panel', :view do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'user is signed out' do
|
context 'when user is signed out' do
|
||||||
let(:user) { nil }
|
let(:user) { nil }
|
||||||
|
|
||||||
it 'is not possible to set notification level' do
|
it 'is not possible to set notification level' do
|
||||||
|
|
Loading…
Reference in a new issue