File tree Expand file tree Collapse file tree 3 files changed +0
-43
lines changed
Expand file tree Collapse file tree 3 files changed +0
-43
lines changed Original file line number Diff line number Diff line change 1616 expect ( index . uid ) . to eq ( key )
1717 expect ( index . primary_key ) . to eq ( key )
1818 end
19-
20- it 'parses options when they are in a different shape' do
21- client . create_index! ( key , priMARy_kEy : key )
22-
23- index = client . fetch_index ( key )
24- expect ( index . uid ) . to eq ( key )
25- expect ( index . primary_key ) . to eq ( key )
26- end
2719end
Original file line number Diff line number Diff line change 7979 expect ( response [ 'facetDistribution' ] [ 'genre' ] [ 'adventure' ] ) . to eq ( 1 )
8080 expect ( response [ 'facetDistribution' ] [ 'genre' ] [ 'fantasy' ] ) . to eq ( 1 )
8181 end
82-
83- context 'with snake_case options' do
84- it 'does a custom search with attributes in a unusual formatting' do
85- response = index . search (
86- 'prince' ,
87- {
88- aTTributes_TO_Crop : [ 'title' ] ,
89- crop_length : 2 ,
90- filter : 'genre = adventure' ,
91- attributes_to_highlight : [ 'title' ]
92- }
93- )
94-
95- expect ( response [ 'hits' ] . count ) . to be ( 1 )
96- expect ( response [ 'hits' ] . first ) . to have_key ( '_formatted' )
97- expect ( response [ 'hits' ] . first [ '_formatted' ] [ 'title' ] ) . to eq ( '…Petit <em>Prince</em>' )
98- end
99- end
10082end
Original file line number Diff line number Diff line change 9797 expect ( settings [ 'stopWords' ] ) . to be_empty
9898 expect ( settings [ 'synonyms' ] ) . to be_empty
9999 end
100-
101- context 'with snake_case options' do
102- it 'does the request with camelCase attributes' do
103- task = index . update_settings (
104- ranking_rules : [ 'typo' ] ,
105- distinct_ATTribute : 'title' ,
106- stopWords : [ 'a' ]
107- )
108-
109- client . wait_for_task ( task [ 'taskUid' ] )
110- settings = index . settings
111-
112- expect ( settings [ 'rankingRules' ] ) . to eq ( [ 'typo' ] )
113- expect ( settings [ 'distinctAttribute' ] ) . to eq ( 'title' )
114- expect ( settings [ 'stopWords' ] ) . to eq ( [ 'a' ] )
115- end
116- end
117100 end
118101
119102 context 'On ranking-rules sub-routes' do
You can’t perform that action at this time.
0 commit comments