gitlabhq/spec/requests/dashboard_merge_requests_spec.rb

48 lines
1.3 KiB
Ruby
Raw Normal View History

require 'spec_helper'
2011-12-15 22:21:29 +01:00
describe "User MergeRequests" do
describe "GET /issues" do
before do
login_as :user
@project1 = Factory :project,
:path => "project1",
:code => "TEST1"
@project2 = Factory :project,
:path => "project2",
:code => "TEST2"
@project1.add_access(@user, :read, :write)
@project2.add_access(@user, :read, :write)
@merge_request1 = Factory :merge_request,
:author => @user,
:assignee => @user,
:project => @project1
@merge_request2 = Factory :merge_request,
:author => @user,
:assignee => @user,
:project => @project2
2011-12-15 22:21:29 +01:00
visit dashboard_merge_requests_path
end
subject { page }
2011-12-15 22:21:29 +01:00
it { should have_content(@merge_request1.title[0..10]) }
it { should have_content(@merge_request1.project.name) }
it { should have_content(@merge_request1.target_branch) }
it { should have_content(@merge_request1.source_branch) }
it { should have_content(@merge_request1.assignee.name) }
2011-12-15 22:21:29 +01:00
it { should have_content(@merge_request2.title[0..10]) }
it { should have_content(@merge_request2.project.name) }
it { should have_content(@merge_request2.target_branch) }
it { should have_content(@merge_request2.source_branch) }
it { should have_content(@merge_request2.assignee.name) }
end
end