saucy 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/accounts_controller.rb +1 -1
- data/app/controllers/memberships_controller.rb +5 -1
- data/lib/generators/saucy/features/templates/features/manage_users.feature +15 -1
- data/lib/generators/saucy/features/templates/features/new_account.feature +3 -0
- data/spec/controllers/accounts_controller_spec.rb +1 -1
- metadata +4 -4
@@ -21,7 +21,7 @@ class AccountsController < ApplicationController
|
|
21
21
|
:account => @signup.account)
|
22
22
|
flash[:success] = "Account was created."
|
23
23
|
sign_in @signup.user
|
24
|
-
redirect_to
|
24
|
+
redirect_to new_account_project_path(@signup.account)
|
25
25
|
else
|
26
26
|
render :action => 'new'
|
27
27
|
end
|
@@ -22,7 +22,11 @@ class MembershipsController < ApplicationController
|
|
22
22
|
def destroy
|
23
23
|
find_membership.destroy
|
24
24
|
flash[:success] = "User removed."
|
25
|
-
|
25
|
+
if @membership.user == current_user
|
26
|
+
redirect_to edit_profile_url
|
27
|
+
else
|
28
|
+
redirect_to account_memberships_url(current_account)
|
29
|
+
end
|
26
30
|
end
|
27
31
|
|
28
32
|
private
|
@@ -103,8 +103,22 @@ Feature: Managing users
|
|
103
103
|
And I should see "Frank is an Admin on Test"
|
104
104
|
When I follow "Remove Frank from Test"
|
105
105
|
Then I should see "User removed"
|
106
|
+
And I should be on the memberships page for the "Test" account
|
107
|
+
And I should not see "Frank"
|
108
|
+
|
109
|
+
Scenario: remove yourself from an account
|
110
|
+
Given an user exists with a name of "Frank"
|
111
|
+
And the following memberships exist:
|
112
|
+
| account | user |
|
113
|
+
| name: Test | name: Frank |
|
114
|
+
When I go to the settings page
|
115
|
+
And I fill in "Name" with "My Name"
|
116
|
+
And I press "Update"
|
106
117
|
When I go to the memberships page for the "Test" account
|
107
|
-
|
118
|
+
And I follow "My Name"
|
119
|
+
When I follow "Remove My Name from Test"
|
120
|
+
Then I should see "User removed"
|
121
|
+
Then I should be on the settings page
|
108
122
|
|
109
123
|
Scenario: Invite new user when at the account limit
|
110
124
|
Given the following limit exists for the "Test" account:
|
@@ -14,6 +14,7 @@ Feature: user adds a new account
|
|
14
14
|
And I press "Sign up"
|
15
15
|
Then I should see "created"
|
16
16
|
But I should not see "Instructions for confirming"
|
17
|
+
And I should be on the new project page for the "Robots" account
|
17
18
|
When I go to the settings page
|
18
19
|
And I follow "Robots"
|
19
20
|
Then the "Keyword" field should contain "robots"
|
@@ -28,6 +29,7 @@ Feature: user adds a new account
|
|
28
29
|
And I fill in "Keyword" with "robots"
|
29
30
|
And I press "Sign up"
|
30
31
|
Then I should see "created"
|
32
|
+
And I should be on the new project page for the "Robots, Inc" account
|
31
33
|
When I go to the settings page
|
32
34
|
And I follow "Robots, Inc"
|
33
35
|
Then the "Keyword" field should contain "robots"
|
@@ -39,6 +41,7 @@ Feature: user adds a new account
|
|
39
41
|
And I press "Sign up"
|
40
42
|
Then I should see "created"
|
41
43
|
But I should not see "Instructions for confirming"
|
44
|
+
And I should be on the new project page for the "Machines" account
|
42
45
|
When I go to the settings page
|
43
46
|
And I follow "Machines"
|
44
47
|
Then the "Keyword" field should contain "machines"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: saucy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 8
|
10
|
+
version: 0.4.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- thoughtbot, inc.
|
@@ -18,7 +18,7 @@ autorequire:
|
|
18
18
|
bindir: bin
|
19
19
|
cert_chain: []
|
20
20
|
|
21
|
-
date: 2011-04-
|
21
|
+
date: 2011-04-20 00:00:00 -04:00
|
22
22
|
default_executable:
|
23
23
|
dependencies:
|
24
24
|
- !ruby/object:Gem::Dependency
|