summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authortiagonbotelho <tiagonbotelho@hotmail.com>2016-11-11 22:57:23 +0000
committertiagonbotelho <tiagonbotelho@hotmail.com>2016-11-11 22:57:23 +0000
commit062c9a08c44f2e178476cace0ebd8a55aa27e866 (patch)
treec908b63b39dab76b5a6058023dea543bd7ee88bd /spec/helpers
parent0527ea09920d49bb9e1574e7a61958ba70dbe24e (diff)
downloadgitlab-ce-062c9a08c44f2e178476cace0ebd8a55aa27e866.tar.gz
change empty project view to annonymous user from activity to empty partial
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/preferences_helper_spec.rb9
1 files changed, 3 insertions, 6 deletions
diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb
index 3830fe26158..2bd4eace89f 100644
--- a/spec/helpers/preferences_helper_spec.rb
+++ b/spec/helpers/preferences_helper_spec.rb
@@ -90,19 +90,16 @@ describe PreferencesHelper do
let(:project) { create(:project) }
context 'user not signed in' do
- before do
- stub_user
- @repository = project.repository
- end
+ before { stub_user }
it 'returns readme view if repository is not empty' do
expect(helper.default_project_view).to eq('readme')
end
it 'returns activity if repository is empty' do
- expect(@repository).to receive(:head_commit).and_return(nil)
+ expect(project).to receive(:empty_repo?).and_return(true)
- expect(helper.default_project_view).to eq('activity')
+ expect(helper.default_project_view).to eq('empty')
end
end
end