Commit c923dc6a9ddb25a44ec63b0a68912b42561c87ef
Committed by
Antonio Terceiro
1 parent
3cee90ca
Exists in
master
and in
29 other branches
Organization's name can be changed
ActionItem1284
Showing
3 changed files
with
43 additions
and
0 deletions
Show diff stats
app/views/profile_editor/_organization.rhtml
... | ... | @@ -2,6 +2,8 @@ |
2 | 2 | |
3 | 3 | <%= required_fields_message if @profile.required_fields.any? %> |
4 | 4 | |
5 | + <%= required f.text_field(:name) %> | |
6 | + | |
5 | 7 | <% if @environment.enabled?('enable_organization_url_change') %> |
6 | 8 | <script type="text/javascript"> |
7 | 9 | function updateUrlField(name_field, id) { | ... | ... |
... | ... | @@ -0,0 +1,35 @@ |
1 | +Feature: change organization name | |
2 | + As an organization's admin | |
3 | + I want to change it's name | |
4 | + In order to keep it's name consistent | |
5 | + | |
6 | + Scenario: changing community's name | |
7 | + Given the following communities | |
8 | + | identifier | name | | |
9 | + | sample-community | Sample Community | | |
10 | + And the following users | |
11 | + | login | name | | |
12 | + | joaosilva | Joao Silva | | |
13 | + And "Joao Silva" is admin of "Sample Community" | |
14 | + And I am logged in as "joaosilva" | |
15 | + And I am on Sample Community's control panel | |
16 | + And I follow "Community Info and settings" | |
17 | + And I fill in "Name" with "New Sample Community" | |
18 | + When I press "Save" | |
19 | + Then I should be on New Sample Community's control panel | |
20 | + | |
21 | + | |
22 | + Scenario: changing enterprise's name | |
23 | + Given the following enterprises | |
24 | + | identifier | name | | |
25 | + | sample-enterprise | Sample Enterprise | | |
26 | + And the following users | |
27 | + | login | name | | |
28 | + | joaosilva | Joao Silva | | |
29 | + And "Joao Silva" is admin of "Sample Enterprise" | |
30 | + And I am logged in as "joaosilva" | |
31 | + And I am on Sample Enterprise's control panel | |
32 | + And I follow "Enterprise Info and settings" | |
33 | + And I fill in "Name" with "New Sample Enterprise" | |
34 | + When I press "Save" | |
35 | + Then I should be on New Sample Enterprise's control panel | ... | ... |
features/step_definitions/noosfero_steps.rb
... | ... | @@ -97,3 +97,9 @@ end |
97 | 97 | Given /^"(.+)" should be a member of "(.+)"$/ do |person,profile| |
98 | 98 | Profile.find_by_name(profile).members.should include(Person.find_by_name(person)) |
99 | 99 | end |
100 | + | |
101 | +Given /^"(.+)" is admin of "(.+)"$/ do |person, organization| | |
102 | + org = Profile.find_by_name(organization) | |
103 | + user = Profile.find_by_name(person) | |
104 | + org.add_admin(user) | |
105 | +end | ... | ... |