mirror of
https://github.com/docusealco/docuseal
synced 2026-11-06 06:52:33 -05:00
add cancan for authorization
This commit is contained in:
1 parent
f89c50d096
commit
2f1843151d
58 files changed
+341
-184
No files matched your search
@@ -23,6 +23,7 @@ RSpec.describe 'Dashboard Page' do
|
||||
context 'when there are templates' do
|
||||
let!(:authors) { create_list(:user, 5, account:) }
|
||||
let!(:templates) { authors.map { |author| create(:template, account:, author:) } }
|
||||
let!(:other_template) { create(:template) }
|
||||
|
||||
before do
|
||||
visit root_path
|
||||
@@ -35,6 +36,7 @@ RSpec.describe 'Dashboard Page' do
|
||||
end
|
||||
|
||||
expect(page).to have_content('Templates')
|
||||
expect(page).not_to have_content(other_template.name)
|
||||
expect(page).to have_link('Create', href: new_template_path)
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user