show found submissions when searching on templates
This commit is contained in:
committed by
Pete Matsyburka
parent
6f0e7c0ca8
commit
36331bb993
@@ -49,5 +49,18 @@ RSpec.describe 'Dashboard Page' do
|
||||
expect(page).to have_current_path(edit_template_path(Template.last), ignore_query: true)
|
||||
end
|
||||
end
|
||||
|
||||
it 'searches be submitter email' do
|
||||
submission = create(:submission, :with_submitters, template: templates[0])
|
||||
submitter = submission.submitters.first
|
||||
|
||||
SearchEntries.reindex_all
|
||||
|
||||
visit root_path(q: submitter.email)
|
||||
|
||||
expect(page).to have_content('Templates not Found')
|
||||
expect(page).to have_content('Submissions')
|
||||
expect(page).to have_content(submitter.name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user