Commit ce4f6b731e27bd64433aff78c237cd993b7559e8
1 parent
24980223
Exists in
master
and in
1 other branch
Fix issue of failed page to create apps
The page to create an apps failed. Fix #586
Showing
2 changed files
with
8 additions
and
4 deletions
Show diff stats
app/views/apps/_fields.html.haml
@@ -4,10 +4,11 @@ | @@ -4,10 +4,11 @@ | ||
4 | = f.label :name | 4 | = f.label :name |
5 | = f.text_field :name | 5 | = f.text_field :name |
6 | 6 | ||
7 | -%div | ||
8 | - %label Api Key | ||
9 | - %span= app.api_key | ||
10 | - = link_to t('.regenerate_api_key'), regenerate_api_key_app_path(app), :class => 'button', :method => 'post' | 7 | +- unless app.new_record? |
8 | + %div | ||
9 | + %label Api Key | ||
10 | + %span= app.api_key | ||
11 | + = link_to t('.regenerate_api_key'), regenerate_api_key_app_path(app), :class => 'button', :method => 'post' | ||
11 | %div | 12 | %div |
12 | = f.label :repository_branch | 13 | = f.label :repository_branch |
13 | = f.text_field :repository_branch, :placeholder => "master" | 14 | = f.text_field :repository_branch, :placeholder => "master" |
spec/acceptance/app_regenerate_api_key_spec.rb
@@ -17,6 +17,9 @@ feature "Regeneration api_Key" do | @@ -17,6 +17,9 @@ feature "Regeneration api_Key" do | ||
17 | }.to change { | 17 | }.to change { |
18 | app.reload.api_key | 18 | app.reload.api_key |
19 | } | 19 | } |
20 | + click_link I18n.t('shared.navigation.apps') | ||
21 | + click_link I18n.t('apps.index.new_app') | ||
22 | + expect(page).to_not have_button I18n.t('apps.fields.regenerate_api_key') | ||
20 | end | 23 | end |
21 | 24 | ||
22 | scenario "a user cannot access to edit page" do | 25 | scenario "a user cannot access to edit page" do |