Continue refactoring. Use repostory and team
This commit is contained in:
parent
39ba934c0a
commit
dccd8b6eaa
42 changed files with 219 additions and 179 deletions
|
@ -61,7 +61,7 @@ class Dashboard < Spinach::FeatureSteps
|
|||
|
||||
And 'I own project "Shop"' do
|
||||
@project = create :project, name: 'Shop'
|
||||
@project.add_access(@user, :admin)
|
||||
@project.team << [@user, :master]
|
||||
end
|
||||
|
||||
And 'I have group with projects' do
|
||||
|
@ -69,7 +69,7 @@ class Dashboard < Spinach::FeatureSteps
|
|||
@project = create(:project, group: @group)
|
||||
@event = create(:closed_issue_event, project: @project)
|
||||
|
||||
@project.add_access current_user, :admin
|
||||
@project.team << [current_user, :master]
|
||||
end
|
||||
|
||||
And 'project "Shop" has push event' do
|
||||
|
|
|
@ -13,7 +13,7 @@ class DashboardIssues < Spinach::FeatureSteps
|
|||
|
||||
And 'I have assigned issues' do
|
||||
project = create :project
|
||||
project.add_access(@user, :read, :write)
|
||||
project.team << [@user, :master]
|
||||
|
||||
2.times { create :issue, author: @user, assignee: @user, project: project }
|
||||
end
|
||||
|
|
|
@ -14,8 +14,8 @@ class DashboardMergeRequests < Spinach::FeatureSteps
|
|||
project1 = create :project
|
||||
project2 = create :project
|
||||
|
||||
project1.add_access(@user, :read, :write)
|
||||
project2.add_access(@user, :read, :write)
|
||||
project1.team << [@user, :master]
|
||||
project2.team << [@user, :master]
|
||||
|
||||
merge_request1 = create :merge_request, author: @user, project: project1
|
||||
merge_request2 = create :merge_request, author: @user, project: project2
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
class DashboardSearch < Spinach::FeatureSteps
|
||||
include SharedAuthentication
|
||||
include SharedPaths
|
||||
include SharedProject
|
||||
|
||||
Given 'I search for "Sho"' do
|
||||
fill_in "dashboard_search", with: "Sho"
|
||||
|
@ -11,11 +12,6 @@ class DashboardSearch < Spinach::FeatureSteps
|
|||
page.should have_link "Shop"
|
||||
end
|
||||
|
||||
And 'I own project "Shop"' do
|
||||
@project = create(:project, :name => "Shop")
|
||||
@project.add_access(@user, :admin)
|
||||
end
|
||||
|
||||
Given 'I search for "Contibuting"' do
|
||||
fill_in "dashboard_search", with: "Contibuting"
|
||||
click_button "Search"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue