diff options
author | randx <dmitriy.zaporozhets@gmail.com> | 2012-06-13 00:13:42 +0400 |
---|---|---|
committer | randx <dmitriy.zaporozhets@gmail.com> | 2012-06-13 00:13:42 +0400 |
commit | edd81a79c5c2a61e565664cfa787185c4e19729b (patch) | |
tree | 697e212f910ea9f6bc08f91065cf90a68afc44a7 /spec/requests/dashboard_spec.rb | |
parent | 9ef9c58f55e2613910623e66205df402f2a89f14 (diff) |
Dashboard refactoring:
* dashboard should be in dashboard controller not project index
* projects index removed
Diffstat (limited to 'spec/requests/dashboard_spec.rb')
-rw-r--r-- | spec/requests/dashboard_spec.rb | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/requests/dashboard_spec.rb b/spec/requests/dashboard_spec.rb new file mode 100644 index 00000000000..16ededd02af --- /dev/null +++ b/spec/requests/dashboard_spec.rb @@ -0,0 +1,39 @@ +require 'spec_helper' + +describe "User Dashboard" do + before { login_as :user } + + describe "GET /" do + before do + @project = Factory :project, :owner => @user + @project.add_access(@user, :read) + visit dashboard_path + end + + it "should be on projects page" do + current_path.should == dashboard_path + end + + it "should have link to new project" do + page.should have_content("New Project") + end + + it "should have project" do + page.should have_content(@project.name) + end + + it "should render projects atom feed via private token" do + logout + + visit dashboard_path(:atom, :private_token => @user.private_token) + page.body.should have_selector("feed title") + end + + it "should not render projects page via private token" do + logout + + visit dashboard_path(:private_token => @user.private_token) + current_path.should == new_user_session_path + end + end +end |