Gentoo Archives: gentoo-commits

From: "Petteri Räty" <betelgeuse@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/council-webapp:master commit in: site/, site/features/step_definitions/, site/features/, site/config/
Date: Wed, 03 Aug 2011 08:01:30
Message-Id: 1e829811778c1bca279e4ba3816b504125a02830.betelgeuse@gentoo
1 commit: 1e829811778c1bca279e4ba3816b504125a02830
2 Author: Joachim Filip Ignacy Bartosik <jbartosik <AT> gmail <DOT> com>
3 AuthorDate: Mon Aug 1 14:33:02 2011 +0000
4 Commit: Petteri Räty <betelgeuse <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 2 09:20:41 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/council-webapp.git;a=commit;h=1e829811
7
8 Fix problem with passwords shown as open text during signup
9
10 ---
11 site/Gemfile.lock | 7 ++++---
12 site/config/hobo_routes.rb | 15 ---------------
13 site/features/signup.feature | 12 ++++++++++++
14 site/features/step_definitions/signup_steps.rb | 15 +++++++++++++++
15 4 files changed, 31 insertions(+), 18 deletions(-)
16
17 diff --git a/site/Gemfile.lock b/site/Gemfile.lock
18 index 277f060..757bf78 100644
19 --- a/site/Gemfile.lock
20 +++ b/site/Gemfile.lock
21 @@ -1,6 +1,6 @@
22 GIT
23 remote: git://github.com/ahenobarbi/hobo.git
24 - revision: c9c13eb614a3c4a699a59d02e4757c2cdd682988
25 + revision: 6051f2f6b1f320f05687454e580af2f6849597e4
26 branch: rails3
27 specs:
28 dryml (1.3.0)
29 @@ -148,7 +148,7 @@ GEM
30 faraday (~> 0.6.1)
31 multi_json (>= 0.0.5)
32 orm_adapter (0.0.5)
33 - polyglot (0.3.1)
34 + polyglot (0.3.2)
35 rack (1.2.3)
36 rack-mount (0.6.14)
37 rack (>= 1.0.0)
38 @@ -202,7 +202,8 @@ GEM
39 sqlite3 (>= 1.3.3)
40 term-ansicolor (1.0.5)
41 thor (0.14.6)
42 - treetop (1.4.9)
43 + treetop (1.4.10)
44 + polyglot
45 polyglot (>= 0.3.1)
46 typhoeus (0.2.4)
47 mime-types
48
49 diff --git a/site/config/hobo_routes.rb b/site/config/hobo_routes.rb
50 index cdddabf..a223db4 100644
51 --- a/site/config/hobo_routes.rb
52 +++ b/site/config/hobo_routes.rb
53 @@ -1,18 +1,3 @@
54 -# Gentoo Council Web App - to help Gentoo Council do their job better
55 -# Copyright (C) 2011 Joachim Filip Bartosik
56 -#
57 -# This program is free software: you can redistribute it and/or modify
58 -# it under the terms of the GNU Affero General Public License as
59 -# published by the Free Software Foundation, version 3 of the License
60 -#
61 -# This program is distributed in the hope that it will be useful,
62 -# but WITHOUT ANY WARRANTY; without even the implied warranty of
63 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
64 -# GNU Affero General Public License for more details.
65 -#
66 -# You should have received a copy of the GNU Affero General Public License
67 -# along with this program. If not, see <http://www.gnu.org/licenses/>.
68 -
69 # This is an auto-generated file: don't edit!
70 # You can add your own routes in the config/routes.rb file
71 # which will override the routes in this file.
72
73 diff --git a/site/features/signup.feature b/site/features/signup.feature
74 new file mode 100644
75 index 0000000..573eac8
76 --- /dev/null
77 +++ b/site/features/signup.feature
78 @@ -0,0 +1,12 @@
79 +Feature: Singup
80 + As user I want to be able to signup
81 + And do it properly
82 +
83 + Scenario: Always show password as in password type inputs
84 + When I am on the homepage
85 + And I follow "Signup"
86 + Then I should see proper password entries
87 +
88 + When I fill in bad user info
89 + And I press "Signup"
90 + Then I should see proper password entries
91
92 diff --git a/site/features/step_definitions/signup_steps.rb b/site/features/step_definitions/signup_steps.rb
93 new file mode 100644
94 index 0000000..4bc1c2c
95 --- /dev/null
96 +++ b/site/features/step_definitions/signup_steps.rb
97 @@ -0,0 +1,15 @@
98 +Then /^I should see proper password entries$/ do
99 + page.should have_xpath("//input[@type='password'][@name='user[password]']")
100 + page.should have_xpath("//input[@type='password'][@name='user[password_confirmation]']")
101 +end
102 +
103 +When /^I fill in bad user info$/ do
104 + When "I fill in the following:", table(%{
105 + |user[name] |User Name |
106 + |user[email] |user@××××.com |
107 + |user[irc_nick] |user |
108 + |user[password] |SomePassword |
109 + |user[password_confirmation]|some_password |
110 + })
111 +
112 +end