Commit ed132273 by liyijie

Use records instead of resource_plural

parent a3a23dea
......@@ -71,7 +71,7 @@ resource_singular %>_ref
<% elsif details[:summary].start_with?("list") -%>
it {
body = JSON.parse(response.body)
expect(body['<%= resource_plural %>'].count).to eq @<%= resource_model_singular %>_count
expect(body['records'].count).to eq @<%= resource_model_singular %>_count
}
<% elsif details[:summary].start_with?("delete") -%>
it {
......
......@@ -2,4 +2,4 @@ json.current_page @<%= resource_plural %>.current_page
json.total_pages @<%= resource_plural %>.total_pages
json.total_count @<%= resource_plural %>.count
json.<%= resource_plural %> @<%= resource_plural %>, partial: '<%= view_path %>/simple', as: :<%= resource_singular %>
json.records @<%= resource_plural %>, partial: '<%= view_path %>/simple', as: :<%= resource_singular %>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment