Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion backend/app/views/spree/admin/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<td class="align-center"><%= l user.created_at.to_date %></td>
<td data-hook="admin_users_index_row_actions" class="actions">
<% if can?(:edit, user) %>
<%= link_to_edit user, no_text: true, url: spree.admin_user_path(user) %>
<%= link_to_edit user, no_text: true, url: spree.edit_admin_user_path(user) %>
<% end %>
<% if can?(:destroy, user) && user.can_be_deleted? %>
<%= link_to_delete user, no_text: true, url: spree.admin_user_path(user) %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
end)
@actual_user_class_name = Spree.user_class.name
Spree.user_class = "UserModel"
UserModel.create(email: "a@solidus.io")
@custom_user = UserModel.create(email: "a@solidus.io")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this instance variable?

allow(Spree.user_class).to receive(:find_by)
.with(hash_including(:spree_api_key))
.and_return(Spree.user_class.new)
Expand All @@ -88,6 +88,9 @@
get :index

expect(response).to be_successful

edit_link = Nokogiri::HTML(response.body).at_css("a.icon_link[data-action='edit']")
expect(edit_link["href"]).to eq spree.edit_admin_user_path(@custom_user)
end
end
end
Expand Down
Loading