Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[#2595] Linked to the Kanban panel.

* Added an empty KanbansController
* Added a functional test for KanbansController#index
* Added some routing for cucumber
* Added a cucumber feature for the menu
  • Loading branch information...
commit d0b1816c73c06fbdc13f4bb57913f141ccc664fd 1 parent 3970e44
@edavis10 authored
View
5 app/controllers/kanbans_controller.rb
@@ -0,0 +1,5 @@
+class KanbansController < ApplicationController
+ unloadable
+ def index
+ end
+end
View
2  app/helpers/kanbans_helper.rb
@@ -0,0 +1,2 @@
+module KanbansHelper
+end
View
1  app/views/kanbans/index.html.erb
@@ -0,0 +1 @@
+<h2>Kanbans#index</h2>
View
11 features/kanban_page.feature
@@ -0,0 +1,11 @@
+Feature: Kanban Page
+ As a user
+ I want to see issues grouped according to Kanban
+ So I know what to work on next
+
+ Scenario: Kanban top menu item
+ Given I am logged in
+ And I am on the Homepage
+
+ Then I should see a "top" menu item called "Kanban"
+
View
19 features/step_definitions/plugin_steps.rb
@@ -1,7 +1,26 @@
+Before do
+ Sham.reset
+end
+
Given /^there is a user$/ do
@user = User.make
end
+Given /^I am logged in$/ do
+ @current_user = User.make
+ User.stubs(:current).returns(@current_user)
+end
+
+Given /^I am on the Homepage$/ do
+ visit url_for(:controller => 'welcome')
+end
+
+Then /^I should see a "top" menu item called "(.*)"$/ do |name|
+ assert_select("div#top-menu") do
+ assert_select("a", name)
+ end
+end
+
Then /^there should be a user$/ do
assert_equal 1, User.count(:conditions => {:login => @user.login})
end
View
11 features/support/paths.rb
@@ -0,0 +1,11 @@
+def path_to(page_name)
+ case page_name
+
+ when /the homepage/i
+ url_for(:controller => 'welcome')
+ # Add more page name => path mappings here
+
+ else
+ raise "Can't find mapping from \"#{page_name}\" to a path."
+ end
+end
View
5 init.rb
@@ -9,4 +9,9 @@
version '0.1.0'
requires_redmine :version_or_higher => '0.8.0'
+
+ menu(:top_menu,
+ :kanban,
+ {:controller => 'kanbans', :action => 'index'},
+ :caption => :kanban_title)
end
View
4 lang/en.yml
@@ -1,2 +1,2 @@
-# English strings go here
-my_label: "My label"
+kanban_title: Kanban
+
View
1  routes.rb
@@ -0,0 +1 @@
+resource :kanban
View
11 test/functional/kanbans_controller_test.rb
@@ -0,0 +1,11 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class KanbansControllerTest < ActionController::TestCase
+ context "on GET to :index" do
+ setup { get :index }
+
+ should_respond_with :success
+ should_render_template :index
+ should_not_set_the_flash
+ end
+end

0 comments on commit d0b1816

Please sign in to comment.
Something went wrong with that request. Please try again.