30985.diff

Go MAEDA, 2019-03-07 15:28

Download (1.17 KB)

View differences:

app/views/users/show.html.erb (作業コピー)
13 13
  <% end %>
14 14
  <% @user.visible_custom_field_values.each do |custom_value| %>
15 15
  <% if !custom_value.value.blank? %>
16
    <li><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
16
    <li class="cf_<%= custom_value.custom_field.id %>"><%= custom_value.custom_field.name %>: <%= show_value(custom_value) %></li>
17 17
  <% end %>
18 18
  <% end %>
19 19
    <li><%=l(:label_registered_on)%>: <%= format_date(@user.created_on) %></li>
test/functional/users_controller_test.rb (作業コピー)
118 118
    get :show, :params => {:id => 2}
119 119
    assert_response :success
120 120

  
121
    assert_select 'li', :text => /Phone number/
121
    assert_select 'li[class=?]', 'cf_4', :text => /Phone number/
122 122
  end
123 123

  
124 124
  def test_show_should_not_display_hidden_custom_fields