2011-11-02 21:14:03 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Dashboard" do
|
|
|
|
before { login_as :user }
|
|
|
|
|
|
|
|
describe "GET /dashboard" do
|
|
|
|
before do
|
|
|
|
@project = Factory :project
|
|
|
|
@project.add_access(@user, :read, :write)
|
|
|
|
visit dashboard_path
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should be on dashboard page" do
|
|
|
|
current_path.should == dashboard_path
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should have projects panel" do
|
2011-11-15 09:34:30 +01:00
|
|
|
within ".project-list" do
|
2011-11-02 21:14:03 +01:00
|
|
|
page.should have_content(@project.name)
|
|
|
|
end
|
|
|
|
end
|
2011-11-15 09:34:30 +01:00
|
|
|
|
2011-11-02 21:14:03 +01:00
|
|
|
it "should have news feed" do
|
2011-11-15 09:34:30 +01:00
|
|
|
within "#news-feed" do
|
2011-11-22 15:01:53 +01:00
|
|
|
page.should have_content("commit")
|
2011-11-02 21:14:03 +01:00
|
|
|
page.should have_content(@project.commit.author.name)
|
|
|
|
page.should have_content(@project.commit.safe_message)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|