Spinach tests fixed

This commit is contained in:
Andrew8xx8 2013-02-18 14:43:08 +04:00
parent 69698aacbc
commit 6074896cbf
3 changed files with 7 additions and 9 deletions

View file

@ -1,6 +1,6 @@
%li{class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: dom_id(milestone) }
.pull-right
- if can?(current_user, :admin_milestone, milestone.project) and milestone.opened?
- if can?(current_user, :admin_milestone, milestone.project) and milestone.active?
= link_to edit_project_milestone_path(milestone.project, milestone), class: "btn btn-small edit-milestone-link grouped" do
%i.icon-edit
Edit

View file

@ -122,10 +122,9 @@ class ProjectIssues < Spinach::FeatureSteps
And 'project "Shop" have "Release 0.3" closed issue' do
project = Project.find_by_name("Shop")
create(:issue,
create(:closed_issue,
:title => "Release 0.3",
:project => project,
:author => project.users.first,
:closed => true)
:author => project.users.first)
end
end

View file

@ -26,7 +26,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
Then 'I should see closed merge request "Bug NS-04"' do
mr = MergeRequest.find_by_title("Bug NS-04")
mr.closed.should be_true
mr.closed?.should be_true
page.should have_content "Closed by"
end
@ -64,7 +64,7 @@ class ProjectMergeRequests < Spinach::FeatureSteps
And 'project "Shop" have "Bug NS-04" open merge request' do
project = Project.find_by_name("Shop")
create(:merge_request,
create(:closed_merge_request,
title: "Bug NS-04",
project: project,
author: project.users.first)
@ -80,11 +80,10 @@ class ProjectMergeRequests < Spinach::FeatureSteps
And 'project "Shop" have "Feature NS-03" closed merge request' do
project = Project.find_by_name("Shop")
create(:merge_request,
create(:closed_merge_request,
title: "Feature NS-03",
project: project,
author: project.users.first,
closed: true)
author: project.users.first)
end
And 'I switch to the diff tab' do