2011-11-02 21:14:03 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
describe "Dashboard" do
|
2011-12-25 19:06:18 +01:00
|
|
|
before do
|
|
|
|
@project = Factory :project
|
2011-12-28 08:07:40 +01:00
|
|
|
@user = User.create(:email => "test917@mail.com",
|
|
|
|
:name => "John Smith",
|
|
|
|
:password => "123456",
|
|
|
|
:password_confirmation => "123456")
|
|
|
|
@project.add_access(@user, :read, :write)
|
|
|
|
login_with(@user)
|
2011-12-25 19:06:18 +01:00
|
|
|
end
|
2011-11-02 21:14:03 +01:00
|
|
|
|
|
|
|
describe "GET /dashboard" do
|
|
|
|
before do
|
|
|
|
visit dashboard_path
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should be on dashboard page" do
|
|
|
|
current_path.should == dashboard_path
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should have projects panel" do
|
2012-03-19 21:52:16 +01:00
|
|
|
page.should have_content(@project.name)
|
2011-11-02 21:14:03 +01:00
|
|
|
end
|
2012-03-19 21:52:16 +01:00
|
|
|
end
|
2011-11-02 21:14:03 +01:00
|
|
|
end
|