diff options
author | Stan Hu <stanhu@gmail.com> | 2015-09-26 03:04:20 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-09-26 18:46:05 +0300 |
commit | 0383afc66ab889afc6af02203902d1d515723a96 (patch) | |
tree | 671139b4d862fa7c04ec5a1930dd3f8cf22dfefc /spec/helpers | |
parent | 6d6918105941bcb868b59350f56eb2f76efd7cf5 (diff) |
Add user preference to view project activity and starred project activity as default dashboard
Closes #2662
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/preferences_helper_spec.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/spec/helpers/preferences_helper_spec.rb b/spec/helpers/preferences_helper_spec.rb index 06f69262b71..e5df59c4fba 100644 --- a/spec/helpers/preferences_helper_spec.rb +++ b/spec/helpers/preferences_helper_spec.rb @@ -8,14 +8,18 @@ describe PreferencesHelper do end it 'raises an exception when defined choices may be using the wrong key' do - expect(User).to receive(:dashboards).and_return(foo: 'foo', bar: 'bar') + dashboards = User.dashboards.dup + dashboards[:projects_changed] = dashboards.delete :projects + expect(User).to receive(:dashboards).and_return(dashboards) expect { helper.dashboard_choices }.to raise_error(KeyError) end it 'provides better option descriptions' do expect(helper.dashboard_choices).to match_array [ ['Your Projects (default)', 'projects'], - ['Starred Projects', 'stars'] + ['Starred Projects', 'stars'], + ["Your Projects' Activity", 'project_activity'], + ["Starred Projects' Activity", 'starred_project_activity'] ] end end |