blacklight 4.3.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/.travis.yml +0 -6
  4. data/Gemfile +5 -0
  5. data/README.md +1 -1
  6. data/Rakefile +0 -1
  7. data/VERSION +1 -1
  8. data/app/assets/javascripts/blacklight/autofocus.js +16 -0
  9. data/app/assets/javascripts/blacklight/blacklight.js +1 -0
  10. data/app/assets/javascripts/blacklight/bookmark_toggle.js +2 -5
  11. data/app/assets/javascripts/blacklight/checkbox_submit.js +3 -6
  12. data/app/assets/javascripts/blacklight/core.js +24 -1
  13. data/app/assets/javascripts/blacklight/css_dropdowns.js +2 -2
  14. data/app/assets/javascripts/blacklight/facet_expand_contract.js +4 -3
  15. data/app/assets/javascripts/blacklight/lightbox_dialog.js +7 -1
  16. data/app/assets/javascripts/blacklight/search_context.js +1 -1
  17. data/app/assets/javascripts/blacklight/select_submit.js +1 -1
  18. data/app/assets/javascripts/blacklight/zebra_stripe.js +1 -1
  19. data/app/assets/stylesheets/blacklight/_blacklight_base.css.scss +1 -0
  20. data/app/assets/stylesheets/blacklight/_catalog.css.scss +5 -0
  21. data/app/assets/stylesheets/blacklight/_facets.css.scss +6 -0
  22. data/app/assets/stylesheets/blacklight/_group.css.scss +14 -0
  23. data/app/assets/stylesheets/blacklight/blacklight_defaults.css.scss +1 -0
  24. data/app/controllers/bookmarks_controller.rb +2 -2
  25. data/app/helpers/blacklight/blacklight_helper_behavior.rb +41 -24
  26. data/app/helpers/blacklight/catalog_helper_behavior.rb +48 -28
  27. data/app/helpers/blacklight/facets_helper_behavior.rb +9 -75
  28. data/app/models/record_mailer.rb +1 -16
  29. data/app/views/bookmarks/index.html.erb +2 -0
  30. data/app/views/catalog/_bookmark_control.html.erb +3 -4
  31. data/app/views/catalog/_document.html.erb +2 -1
  32. data/app/views/catalog/_document_header.html.erb +6 -3
  33. data/app/views/catalog/_email_form.html.erb +0 -7
  34. data/app/views/catalog/_facet_layout.html.erb +1 -1
  35. data/app/views/catalog/_group_default.html.erb +12 -0
  36. data/app/views/catalog/_index_default.html.erb +1 -1
  37. data/app/views/catalog/_opensearch_response_metadata.html.erb +2 -3
  38. data/app/views/catalog/_paginate_compact.html.erb +2 -2
  39. data/app/views/catalog/_results_pagination.html.erb +2 -2
  40. data/app/views/catalog/_search_form.html.erb +1 -1
  41. data/app/views/catalog/_sms_form.html.erb +1 -21
  42. data/app/views/catalog/_thumbnail_default.html.erb +5 -0
  43. data/app/views/catalog/email_sent.html.erb +9 -0
  44. data/app/views/catalog/index.atom.builder +7 -8
  45. data/app/views/catalog/index.html.erb +6 -3
  46. data/app/views/catalog/librarian_view.html.erb +1 -1
  47. data/app/views/catalog/sms_sent.html.erb +9 -0
  48. data/app/views/feedback/complete.html.erb +2 -0
  49. data/app/views/feedback/show.html.erb +7 -5
  50. data/app/views/kaminari/blacklight_compact/_paginator.html.erb +1 -1
  51. data/app/views/layouts/blacklight.html.erb +1 -2
  52. data/app/views/saved_searches/index.html.erb +2 -0
  53. data/app/views/search_history/index.html.erb +1 -1
  54. data/blacklight.gemspec +1 -1
  55. data/config/locales/blacklight.en.yml +11 -0
  56. data/config/locales/blacklight.fr.yml +15 -1
  57. data/gemfiles/rails3.gemfile +7 -0
  58. data/gemfiles/rails4.gemfile +7 -0
  59. data/lib/blacklight.rb +1 -0
  60. data/lib/blacklight/catalog.rb +101 -56
  61. data/lib/blacklight/configuration.rb +1 -1
  62. data/lib/blacklight/controller.rb +7 -4
  63. data/lib/blacklight/facet.rb +79 -0
  64. data/lib/blacklight/routes.rb +0 -1
  65. data/lib/blacklight/solr/document.rb +4 -0
  66. data/lib/blacklight/solr/document/marc_export.rb +1 -1
  67. data/lib/blacklight/solr_helper.rb +39 -8
  68. data/lib/blacklight/solr_response.rb +35 -3
  69. data/lib/blacklight/solr_response/facets.rb +4 -0
  70. data/lib/blacklight/solr_response/group.rb +33 -0
  71. data/lib/blacklight/solr_response/group_response.rb +49 -0
  72. data/lib/blacklight/solr_response/pagination_methods.rb +27 -0
  73. data/lib/blacklight/user.rb +30 -32
  74. data/lib/generators/blacklight/assets_generator.rb +3 -1
  75. data/lib/generators/blacklight/blacklight_generator.rb +28 -125
  76. data/lib/generators/blacklight/marc_generator.rb +66 -0
  77. data/lib/generators/blacklight/models_generator.rb +113 -0
  78. data/lib/generators/blacklight/templates/alternate_controller.rb +9 -0
  79. data/lib/generators/blacklight/templates/config/solr.yml +0 -2
  80. data/lib/generators/blacklight/templates/solr_document.rb +1 -13
  81. data/lib/railties/all_tests.rake +5 -8
  82. data/spec/controllers/catalog_controller_spec.rb +185 -113
  83. data/spec/features/alternate_controller_spec.rb +34 -0
  84. data/spec/features/bookmarks_spec.rb +58 -0
  85. data/spec/features/did_you_mean_spec.rb +135 -0
  86. data/spec/features/librarian_view_spec.rb +13 -0
  87. data/spec/features/record_view_spec.rb +37 -0
  88. data/spec/features/saved_searches_spec.rb +47 -0
  89. data/spec/features/search_filters_spec.rb +137 -0
  90. data/spec/features/search_history_spec.rb +75 -0
  91. data/spec/features/search_pagination_spec.rb +91 -0
  92. data/spec/features/search_results_spec.rb +68 -0
  93. data/spec/features/search_sort_spec.rb +20 -0
  94. data/spec/features/search_spec.rb +108 -0
  95. data/spec/helpers/blacklight_helper_spec.rb +45 -2
  96. data/spec/helpers/catalog_helper_spec.rb +134 -1
  97. data/spec/helpers/facets_helper_spec.rb +8 -0
  98. data/spec/lib/blacklight/solr_response/group_response_spec.rb +78 -0
  99. data/spec/lib/blacklight/solr_response/group_spec.rb +70 -0
  100. data/spec/lib/blacklight_solr_response_spec.rb +11 -5
  101. data/spec/lib/blacklight_user_spec.rb +22 -41
  102. data/spec/lib/solr_helper_spec.rb +73 -1
  103. data/spec/models/record_mailer_spec.rb +3 -3
  104. data/spec/models/{solr_docment_spec.rb → solr_document_spec.rb} +1 -1
  105. data/spec/spec_helper.rb +0 -1
  106. data/spec/support/features.rb +7 -0
  107. data/spec/support/features/session_helpers.rb +22 -0
  108. data/spec/test_app_templates/Gemfile.extra +0 -4
  109. data/spec/test_app_templates/lib/generators/test_app_generator.rb +0 -6
  110. data/spec/test_app_templates/lib/tasks/blacklight_test_app.rake +1 -9
  111. data/spec/views/catalog/_facets.html.erb_spec.rb +2 -1
  112. data/tasks/blacklight.rake +0 -10
  113. metadata +49 -58
  114. data/features/bookmarks.feature +0 -68
  115. data/features/did_you_mean.feature +0 -123
  116. data/features/librarian_view.feature +0 -18
  117. data/features/record_view.feature +0 -40
  118. data/features/saved_searches.feature +0 -49
  119. data/features/search.feature +0 -83
  120. data/features/search_filters.feature +0 -119
  121. data/features/search_history.feature +0 -85
  122. data/features/search_pagination.feature +0 -53
  123. data/features/search_results.feature +0 -61
  124. data/features/search_sort.feature +0 -27
  125. data/features/step_definitions/bookmarks_steps.rb +0 -6
  126. data/features/step_definitions/error_steps.rb +0 -5
  127. data/features/step_definitions/general_steps.rb +0 -50
  128. data/features/step_definitions/record_view_steps.rb +0 -12
  129. data/features/step_definitions/saved_searches_steps.rb +0 -19
  130. data/features/step_definitions/search_facets_steps.rb +0 -29
  131. data/features/step_definitions/search_history_steps.rb +0 -9
  132. data/features/step_definitions/search_pagination_steps.rb +0 -29
  133. data/features/step_definitions/search_result_steps.rb +0 -115
  134. data/features/step_definitions/search_steps.rb +0 -118
  135. data/features/step_definitions/user_steps.rb +0 -5
  136. data/features/step_definitions/web_steps.rb +0 -217
  137. data/features/support/env.rb +0 -65
  138. data/features/support/paths.rb +0 -48
  139. data/features/support/selectors.rb +0 -40
  140. data/lib/railties/blacklight_cucumber.rake +0 -126
  141. data/lib/solrmarc.log.1 +0 -854
@@ -0,0 +1,135 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Did You Mean" do
4
+ before { visit root_path }
5
+
6
+ describe "searching all fields" do
7
+ it "should have suggestions" do
8
+ fill_in "q", with: 'politica'
9
+ click_button 'search'
10
+
11
+ expect(page).to have_content("Did you mean")
12
+ click_link 'policy'
13
+ within ("#sortAndPerPage") do
14
+ expect(page).to have_content "1 - 2 of 2"
15
+ end
16
+ end
17
+ end
18
+
19
+ describe "for a title search" do
20
+ before { select 'Title', from: 'search_field' }
21
+ it "should have suggestions" do
22
+ # yehudiyam is one letter away from a title word
23
+ fill_in "q", with: 'yehudiyam'
24
+ click_button 'search'
25
+
26
+ expect(page).to have_content("Did you mean")
27
+ click_link 'yehudiyim'
28
+ within ("#sortAndPerPage") do
29
+ expect(page).to have_content "1 to 1 of 1"
30
+ end
31
+ within ("select#search_field") do
32
+ expect(page).to have_selector("option[selected]", text: "Title")
33
+ end
34
+ end
35
+ end
36
+
37
+ describe "for an author search" do
38
+ before { select 'Author', from: 'search_field' }
39
+ it "should have suggestions" do
40
+ # shirma is one letter away from an author word
41
+ fill_in "q", with: 'shirma'
42
+ click_button 'search'
43
+
44
+ expect(page).to have_content("Did you mean")
45
+ click_link 'sharma'
46
+ within ("#sortAndPerPage") do
47
+ expect(page).to have_content "1 to 1 of 1"
48
+ end
49
+ within ("select#search_field") do
50
+ expect(page).to have_selector("option[selected]", text: "Author")
51
+ end
52
+ end
53
+ end
54
+
55
+ describe "for an subject search" do
56
+ before { select 'Subject', from: 'search_field' }
57
+ it "should have suggestions" do
58
+ # wome is one letter away from an author word
59
+ fill_in "q", with: 'wome'
60
+ click_button 'search'
61
+
62
+ expect(page).to have_content("Did you mean")
63
+ click_link 'women'
64
+ within ("#sortAndPerPage") do
65
+ expect(page).to have_content "1 - 3 of 3"
66
+ end
67
+ within ("select#search_field") do
68
+ expect(page).to have_selector("option[selected]", text: "Subject")
69
+ end
70
+ end
71
+ end
72
+
73
+ describe "a multiword query" do
74
+ it "should not have suggestions if there are no matches" do
75
+ fill_in "q", with: 'ooofda ooofda'
76
+ click_button 'search'
77
+
78
+ expect(page).to_not have_content("Did you mean")
79
+ end
80
+
81
+ it "should have separate suggestions" do
82
+ fill_in "q", with: 'politica boo'
83
+ click_button 'search'
84
+
85
+ within(".suggest") do
86
+ expect(page).to have_content("Did you mean")
87
+ expect(page).to have_link('policy')
88
+ expect(page).to have_link('bon')
89
+ expect(page).not_to have_link('policy bon')
90
+ end
91
+
92
+ click_link 'bon'
93
+ within ("#sortAndPerPage") do
94
+ expect(page).to have_content "1 to 1 of 1"
95
+ end
96
+ end
97
+
98
+ it "should ignore repeated terms" do
99
+ fill_in "q", with: 'boo boo'
100
+ click_button 'search'
101
+
102
+ within(".suggest") do
103
+ expect(page).to have_content("Did you mean")
104
+ expect(page).to have_link('bon', count: 1)
105
+ expect(page).not_to have_link('bon bon')
106
+ end
107
+ end
108
+ end
109
+
110
+ it "should show suggestions if there aren't many hits" do
111
+ fill_in "q", with: 'ayaz'
112
+ click_button 'search'
113
+
114
+ expect(page).to have_content("Did you mean")
115
+ click_link 'bya'
116
+ within ("#sortAndPerPage") do
117
+ expect(page).to have_content "1 - 3 of 3"
118
+ end
119
+ end
120
+
121
+ it "should should not show suggestions if there are many results" do
122
+ # histori gives 9 results in 30 record demo index
123
+ fill_in "q", with: 'histori'
124
+ click_button 'search'
125
+ expect(page).to_not have_content("Did you mean")
126
+ end
127
+
128
+ it "should should show suggestions if at the threshold number" do
129
+ # polit gives 5 results in 30 record demo index - 5 is default cutoff
130
+ fill_in "q", with: 'polit'
131
+ click_button 'search'
132
+ expect(page).to have_content("Did you mean")
133
+ end
134
+
135
+ end
@@ -0,0 +1,13 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Librarian view" do
4
+ it "should show marc fields" do
5
+ visit catalog_path('2009373513')
6
+ click_link "Librarian View"
7
+ expect(page).to have_content "Librarian View"
8
+ expect(page).to have_content "LEADER 01213nam a22003614a 4500"
9
+ expect(page).to have_content "100"
10
+ expect(page).to have_content "Lin, Xingzhi."
11
+ expect(page).to have_content "6|"
12
+ end
13
+ end
@@ -0,0 +1,37 @@
1
+ # -*- encoding : utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "Record View" do
5
+ it "should display a normal record" do
6
+ visit catalog_path('2007020969')
7
+ expect(page).to have_content "Title:"
8
+ expect(page).to have_content "Strong Medicine speaks"
9
+ expect(page).to have_content "Subtitle:"
10
+ expect(page).to have_content "a Native American elder has her say : an oral history"
11
+ expect(page).to have_content "Author:"
12
+ expect(page).to have_content "Hearth, Amy Hill, 1958-"
13
+ expect(page).to have_content "Format:"
14
+ expect(page).to have_content "Book"
15
+ expect(page).to have_content "Call number:"
16
+ expect(page).to have_content "E99.D2 H437 2008"
17
+ expect(page).to have_selector("link[rel=alternate]")
18
+
19
+ end
20
+
21
+ it "should not display blank titles" do
22
+ visit catalog_path('2008305903')
23
+ expect(page).not_to have_content "More Information:"
24
+ end
25
+
26
+ it "should not display vernacular records" do
27
+ visit catalog_path('2009373513')
28
+ expect(page).to have_content "次按驟變"
29
+ expect(page).to have_content "林行止"
30
+ expect(page).to have_content "臺北縣板橋市"
31
+ end
32
+ it "should not display 404" do
33
+ visit catalog_path('this_id_does_not_exist')
34
+ page.driver.status_code.should == 404
35
+ expect(page).to have_content "Sorry, you have requested a record that doesn't exist."
36
+ end
37
+ end
@@ -0,0 +1,47 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Saved Searches" do
4
+ before do
5
+ sign_in 'user1'
6
+ visit root_path
7
+ end
8
+
9
+ it "should be empty" do
10
+ click_link 'Saved Searches'
11
+ expect(page).to have_content 'You have no saved searches'
12
+ end
13
+
14
+ describe "with a saved search 'book'" do
15
+ before do
16
+ fill_in "q", with: 'book'
17
+ click_button 'search'
18
+ click_link "History"
19
+ click_button "save"
20
+ click_link 'Saved Searches'
21
+ end
22
+ it "should show saved searches" do
23
+ expect(page).to have_content 'Your saved searches'
24
+ expect(page).to have_content 'book'
25
+ end
26
+ it "should delete saved searches" do
27
+ click_button 'delete'
28
+ expect(page).to have_content 'Successfully removed that saved search.'
29
+ end
30
+
31
+ describe "and a saved search 'dang'" do
32
+ before do
33
+ visit root_path
34
+ fill_in "q", with: 'dang'
35
+ click_button 'search'
36
+ click_link "History"
37
+ click_button "save"
38
+ click_link 'Saved Searches'
39
+ end
40
+ it "should clear the searhes" do
41
+ click_link "Clear Saved Searches"
42
+ expect(page).to have_content 'Cleared your saved searches.'
43
+ expect(page).to have_content 'You have no saved searches'
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,137 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Facets" do
4
+ it "should work without a search term" do
5
+ visit root_path
6
+ click_link "Tibetan"
7
+ within ("#sortAndPerPage") do
8
+ expect(page).to have_content "1 - 6 of 6"
9
+ end
10
+ within(".blacklight-language_facet") do
11
+ expect(page).to have_selector("span.selected", :text => "Tibetan 6")
12
+ end
13
+
14
+ click_link "India"
15
+ within ("#sortAndPerPage") do
16
+ expect(page).to have_content "1 - 2 of 2"
17
+ end
18
+ within(".blacklight-language_facet") do
19
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
20
+ end
21
+ within(".blacklight-subject_geo_facet") do
22
+ expect(page).to have_selector("span.selected", :text => "India 2")
23
+ end
24
+ end
25
+
26
+ it "should work in conjunction with a search term" do
27
+ visit root_path
28
+ fill_in "q", with: 'history'
29
+ click_button 'search'
30
+ within ("#sortAndPerPage") do
31
+ expect(page).to have_content "1 - 9 of 9"
32
+ end
33
+
34
+ click_link "Tibetan"
35
+ within ("#sortAndPerPage") do
36
+ expect(page).to have_content "1 - 2 of 2"
37
+ end
38
+ within(".blacklight-language_facet") do
39
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
40
+ end
41
+ within "#appliedParams" do
42
+ expect(page).to have_content "You searched for:"
43
+ expect(page).to have_content "history"
44
+ end
45
+
46
+ click_link "2004"
47
+
48
+ within ("#sortAndPerPage") do
49
+ expect(page).to have_content "1 to 1 of 1"
50
+ end
51
+ within(".blacklight-language_facet") do
52
+ expect(page).to have_selector("span.selected", :text => "Tibetan 1")
53
+ end
54
+ within(".blacklight-pub_date") do
55
+ expect(page).to have_selector("span.selected", :text => "2004 1")
56
+ end
57
+ end
58
+
59
+ it "should allow removing filters" do
60
+ visit root_path
61
+ click_link "Tibetan"
62
+ within(".blacklight-language_facet") do
63
+ expect(page).to have_selector("span.selected", :text => "Tibetan 6")
64
+ end
65
+ within(".blacklight-language_facet") do
66
+ click_link 'remove'
67
+ end
68
+ expect(page).to_not have_link 'remove'
69
+ expect(page).to have_content('Welcome!')
70
+ end
71
+
72
+ it "should retain filters when you change the search term" do
73
+ visit root_path
74
+ fill_in "q", with: 'history'
75
+ click_button 'search'
76
+ click_link 'Tibetan'
77
+ within(".blacklight-language_facet") do
78
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
79
+ end
80
+
81
+ click_link '2004'
82
+
83
+ within(".blacklight-language_facet") do
84
+ expect(page).to have_selector("span.selected", :text => "Tibetan 1")
85
+ end
86
+ within(".blacklight-pub_date") do
87
+ expect(page).to have_selector("span.selected", :text => "2004 1")
88
+ end
89
+ fill_in "q", with: 'china'
90
+ click_button 'search'
91
+
92
+ within(".blacklight-language_facet") do
93
+ expect(page).to have_selector("span.selected", :text => "Tibetan 1")
94
+ end
95
+ within(".blacklight-pub_date") do
96
+ expect(page).to have_selector("span.selected", :text => "2004 1")
97
+ end
98
+ end
99
+
100
+ it "should retain the filters when we change sort" do
101
+ visit root_path
102
+ fill_in "q", with: 'history'
103
+ click_button 'search'
104
+ click_link 'Tibetan'
105
+ within(".blacklight-language_facet") do
106
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
107
+ end
108
+ click_link 'title'
109
+ within(".blacklight-language_facet") do
110
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
111
+ end
112
+ within "#appliedParams" do
113
+ expect(page).to have_content "You searched for:"
114
+ expect(page).to have_content "history"
115
+ end
116
+ end
117
+
118
+ it "should retain the filters when we change per page number" do
119
+ visit root_path
120
+ fill_in "q", with: 'history'
121
+ click_button 'search'
122
+ click_link 'Tibetan'
123
+ within(".blacklight-language_facet") do
124
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
125
+ end
126
+ within '#per_page-dropdown' do
127
+ click_link '20'
128
+ end
129
+ within(".blacklight-language_facet") do
130
+ expect(page).to have_selector("span.selected", :text => "Tibetan 2")
131
+ end
132
+ within "#appliedParams" do
133
+ expect(page).to have_content "You searched for:"
134
+ expect(page).to have_content "history"
135
+ end
136
+ end
137
+ end
@@ -0,0 +1,75 @@
1
+ require 'spec_helper'
2
+
3
+ describe "Search History Page" do
4
+ describe "navigating from the homepage" do
5
+ it "should have a link to the history page" do
6
+ visit root_path
7
+ click_link 'History'
8
+ expect(page).to have_content 'Search History'
9
+ expect(page).to have_content 'You have no search history'
10
+ end
11
+ end
12
+
13
+ describe "when I have done a search" do
14
+ before do
15
+ visit root_path
16
+ fill_in "q", with: 'book'
17
+ click_button 'search'
18
+ click_link 'History'
19
+ end
20
+ it "should show searches" do
21
+ expect(page).to have_content 'Your recent searches'
22
+ expect(page).to have_content 'book'
23
+ expect(page).to_not have_content 'dang'
24
+ visit root_path
25
+ fill_in "q", with: 'dang'
26
+ click_button 'search'
27
+ click_link 'History'
28
+ expect(page).to have_content 'book'
29
+ expect(page).to have_content 'dang'
30
+ end
31
+ end
32
+
33
+ describe "when i've done several searches" do
34
+ before do
35
+ visit root_path
36
+ fill_in "q", with: 'book'
37
+ click_button 'search'
38
+ fill_in "q", with: 'dang'
39
+ click_button 'search'
40
+ click_link 'History'
41
+ end
42
+ it "should be able to clear the history" do
43
+ click_link "Clear Search History"
44
+ expect(page).to have_content 'Cleared your search history.'
45
+ expect(page).to have_content 'You have no search history'
46
+ expect(page).to_not have_content 'book'
47
+ expect(page).to_not have_content 'dang'
48
+ end
49
+ end
50
+
51
+ describe "when logged in" do
52
+ before do
53
+ sign_in 'user1'
54
+ fill_in "q", with: 'book'
55
+ click_button 'search'
56
+ click_link 'History'
57
+ end
58
+
59
+ it "should save and forget the search" do
60
+ click_button 'save'
61
+ expect(page).to have_content 'Successfully saved your search.'
62
+ click_button 'forget'
63
+ expect(page).to have_content 'Successfully removed that saved search.'
64
+ expect(page).to have_button 'save'
65
+ end
66
+
67
+ it "should not show results after logging out" do
68
+ click_button 'save'
69
+ expect(page).to have_content 'Successfully saved your search.'
70
+ click_link 'Log Out'
71
+ click_link 'History'
72
+ expect(page).to_not have_content 'book'
73
+ end
74
+ end
75
+ end