Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Link to remove a project added

  • Loading branch information...
commit 97909e9286ddcb39bb2177304cf98617759b3538 1 parent 7a27228
Bruno Grasselli BrunoGrasselli authored committed
1  app/views/shared/_project.haml
View
@@ -7,6 +7,7 @@
= yield
= link_to t(:edit), edit_project_path(project)
+= link_to t(:remove), project_path(project), :method => :delete, :confirm => t("are_you_sure")
= link_to t(:build), project_builds_path(project), :method => :post
= link_to t(:specs), specs_path(project.name) if project.has_file?("doc/specs.html")
= link_to t(:features), features_path(project.name) if project.has_file?("doc/features.html")
2  config/locales/en.yml
View
@@ -3,10 +3,12 @@
en:
ago: "ago"
+ are_you_sure: "Are you sure?"
build: "build"
edit: "edit"
deploy: "deploy"
features: "features"
metrics: "metrics"
new_project: "new project"
+ remove: "remove"
specs: "specs"
7 features/manage_project.feature
View
@@ -18,6 +18,13 @@ Feature: Manage projects
Then I should see /Bluepump/
And I should see /gitFake/
+ Scenario: Remove a project
+ Given I have a project with name "Test Project"
+ And I am on the project page
+ When I follow "remove"
+ Then I should be on the projects page
+ And I should not see "Test Project"
+
Scenario: Build project
Given I have a project
And I am on the project page
4 features/step_definitions/projects_steps.rb
View
@@ -2,6 +2,10 @@
@project = Project.create! :name => "whatever", :url => "fake", :email => "fake2"
end
+Given /^I have a project with name "([^"]*)"$/ do |arg1|
+ @project = Project.create! :name => name, :url => "fake", :email => "fake2"
+end
+
When /^I request '(.*)'$/ do |path|
visit path
end
2  features/support/paths.rb
View
@@ -10,6 +10,8 @@ def path_to(page_name)
when /the home\s?page/
'/'
+ when /the projects page/
+ projects_path
when /the new test page/
new_test_path
when /the new projects page/
Please sign in to comment.
Something went wrong with that request. Please try again.