blob: 7a07299a14f816ee6c5e46c846cfa08519f5ccc8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe 'Search Snippets', :js, feature_category: :global_search do
it 'user searches for snippets by title' do
user = create(:user, :no_super_sidebar)
public_snippet = create(:personal_snippet, :public, title: 'Beginning and Middle')
private_snippet = create(:personal_snippet, :private, title: 'Middle and End', author: user)
sign_in user
visit dashboard_snippets_path
submit_search('Middle')
select_search_scope(_("Snippets"))
expect(page).to have_link(public_snippet.title)
expect(page).to have_link(private_snippet.title)
end
end
|