Add test for rails_admin_path_for_resource

This commit is contained in:
Karina Kwiatek 2021-08-06 22:33:02 +02:00
parent 3570171b25
commit c0107e2bc4
1 changed files with 16 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# frozen_string_literal: true
require "rails_helper"
describe ApplicationHelper, :type => :helper do
describe "#rails_admin_path_for_resource" do
context "user resource" do
let(:resource) { FactoryBot.create(:user) }
subject { rails_admin_path_for_resource(resource) }
it "should return a URL to the given resource within rails admin" do
expect(subject).to eq("/justask_admin/user/#{resource.id}")
end
end
end
end