enju_biblio 0.1.0.pre56 → 0.1.0.pre57

Sign up to get free protection for your applications and to get access to all the features.
Files changed (192) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/agent_import_files_controller.rb +1 -1
  3. data/app/controllers/agent_import_results_controller.rb +30 -6
  4. data/app/controllers/agent_relationship_types_controller.rb +74 -4
  5. data/app/controllers/agent_relationships_controller.rb +92 -10
  6. data/app/controllers/agent_types_controller.rb +74 -3
  7. data/app/controllers/carrier_types_controller.rb +1 -1
  8. data/app/controllers/content_types_controller.rb +74 -4
  9. data/app/controllers/countries_controller.rb +66 -4
  10. data/app/controllers/create_types_controller.rb +74 -3
  11. data/app/controllers/extents_controller.rb +74 -4
  12. data/app/controllers/form_of_works_controller.rb +74 -4
  13. data/app/controllers/frequencies_controller.rb +74 -4
  14. data/app/controllers/identifier_types_controller.rb +4 -5
  15. data/app/controllers/import_requests_controller.rb +1 -1
  16. data/app/controllers/languages_controller.rb +66 -4
  17. data/app/controllers/licenses_controller.rb +74 -3
  18. data/app/controllers/manifestation_relationship_types_controller.rb +74 -3
  19. data/app/controllers/manifestation_relationships_controller.rb +92 -9
  20. data/app/controllers/medium_of_performances_controller.rb +74 -3
  21. data/app/controllers/picture_files_controller.rb +34 -10
  22. data/app/controllers/produce_types_controller.rb +74 -3
  23. data/app/controllers/realize_types_controller.rb +74 -3
  24. data/app/controllers/resource_import_files_controller.rb +2 -1
  25. data/app/controllers/resource_import_results_controller.rb +31 -11
  26. data/app/models/agent_import_file.rb +1 -1
  27. data/app/models/agent_import_result.rb +0 -2
  28. data/app/models/carrier_type.rb +1 -1
  29. data/app/models/identifier.rb +5 -0
  30. data/app/models/item.rb +1 -1
  31. data/app/models/manifestation.rb +13 -8
  32. data/app/models/resource_import_file.rb +73 -79
  33. data/app/views/agent_import_files/index.html.erb +1 -0
  34. data/app/views/agent_relationship_types/index.html.erb +5 -4
  35. data/app/views/agent_types/index.html.erb +5 -4
  36. data/app/views/carrier_types/index.html.erb +2 -1
  37. data/app/views/content_types/index.html.erb +1 -0
  38. data/app/views/countries/show.html.erb +5 -0
  39. data/app/views/create_types/index.html.erb +5 -4
  40. data/app/views/extents/index.html.erb +2 -1
  41. data/app/views/form_of_works/index.html.erb +2 -1
  42. data/app/views/frequencies/index.html.erb +2 -1
  43. data/app/views/identifier_types/index.html.erb +12 -5
  44. data/app/views/import_requests/index.html.erb +1 -0
  45. data/app/views/items/show.html.erb +3 -7
  46. data/app/views/languages/_form.html.erb +19 -4
  47. data/app/views/languages/index.html.erb +6 -5
  48. data/app/views/languages/show.html.erb +19 -4
  49. data/app/views/layouts/manifestations.html.erb +2 -1
  50. data/app/views/licenses/index.html.erb +2 -1
  51. data/app/views/manifestation_relationship_types/index.html.erb +5 -4
  52. data/app/views/manifestations/_call_number.html.erb +1 -1
  53. data/app/views/manifestations/_edit_detail.html.erb +4 -1
  54. data/app/views/manifestations/_form.html.erb +5 -5
  55. data/app/views/manifestations/_show_detail_librarian.html.erb +8 -3
  56. data/app/views/manifestations/_show_detail_user.html.erb +8 -3
  57. data/app/views/medium_of_performances/index.html.erb +2 -1
  58. data/app/views/notifier/manifestation_info.en.text.erb +1 -1
  59. data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
  60. data/app/views/picture_files/_index.html.erb +1 -0
  61. data/app/views/picture_files/_index_agent.html.erb +1 -0
  62. data/app/views/picture_files/_index_manifestation.html.erb +1 -0
  63. data/app/views/picture_files/show.html.erb +15 -7
  64. data/app/views/produce_types/index.html.erb +5 -4
  65. data/app/views/realize_types/index.html.erb +5 -4
  66. data/app/views/resource_import_files/index.html.erb +1 -0
  67. data/app/views/series_statements/_index.html.erb +1 -0
  68. data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -0
  69. data/config/locales/translation_en.yml +70 -1
  70. data/config/locales/translation_ja.yml +77 -8
  71. data/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +5 -0
  72. data/lib/enju_biblio/biblio_helper.rb +13 -0
  73. data/lib/enju_biblio/engine.rb +0 -2
  74. data/lib/enju_biblio/version.rb +1 -1
  75. data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +1 -1
  76. data/lib/generators/enju_biblio/setup/templates/db/fixtures/identifier_types.yml +24 -3
  77. data/lib/tasks/enju_biblio_tasks.rake +2 -0
  78. data/lib/tasks/identifier_type.rb +12 -0
  79. data/lib/tasks/item.rb +1 -1
  80. data/spec/cassette_library/ResourceImportFile/when_its_mode_is_create_/when_it_is_written_in_utf-8/should_send_message_when_import_is_completed.yml +433 -0
  81. data/spec/controllers/agent_import_files_controller_spec.rb +35 -35
  82. data/spec/controllers/agent_import_results_controller_spec.rb +11 -11
  83. data/spec/controllers/agent_relationship_types_controller_spec.rb +51 -51
  84. data/spec/controllers/agent_relationships_controller_spec.rb +53 -53
  85. data/spec/controllers/agent_types_controller_spec.rb +15 -15
  86. data/spec/controllers/agents_controller_spec.rb +96 -96
  87. data/spec/controllers/carrier_types_controller_spec.rb +15 -15
  88. data/spec/controllers/content_types_controller_spec.rb +15 -15
  89. data/spec/controllers/countries_controller_spec.rb +25 -25
  90. data/spec/controllers/create_types_controller_spec.rb +15 -15
  91. data/spec/controllers/creates_controller_spec.rb +50 -50
  92. data/spec/controllers/donates_controller_spec.rb +49 -49
  93. data/spec/controllers/extents_controller_spec.rb +15 -15
  94. data/spec/controllers/form_of_works_controller_spec.rb +15 -15
  95. data/spec/controllers/frequencies_controller_spec.rb +6 -6
  96. data/spec/controllers/identifier_types_controller_spec.rb +15 -15
  97. data/spec/controllers/import_requests_controller_spec.rb +50 -50
  98. data/spec/controllers/items_controller_spec.rb +72 -72
  99. data/spec/controllers/languages_controller_spec.rb +18 -18
  100. data/spec/controllers/licenses_controller_spec.rb +15 -15
  101. data/spec/controllers/manifestation_relationship_types_controller_spec.rb +51 -51
  102. data/spec/controllers/manifestation_relationships_controller_spec.rb +53 -53
  103. data/spec/controllers/manifestations_controller_spec.rb +108 -108
  104. data/spec/controllers/medium_of_performances_controller_spec.rb +15 -15
  105. data/spec/controllers/owns_controller_spec.rb +52 -52
  106. data/spec/controllers/picture_files_controller_spec.rb +52 -52
  107. data/spec/controllers/produce_types_controller_spec.rb +15 -15
  108. data/spec/controllers/produces_controller_spec.rb +50 -50
  109. data/spec/controllers/realize_types_controller_spec.rb +15 -15
  110. data/spec/controllers/realizes_controller_spec.rb +51 -51
  111. data/spec/controllers/resource_export_files_controller_spec.rb +38 -38
  112. data/spec/controllers/resource_import_files_controller_spec.rb +38 -38
  113. data/spec/controllers/resource_import_results_controller_spec.rb +15 -15
  114. data/spec/controllers/series_statements_controller_spec.rb +54 -54
  115. data/spec/dummy/db/development.sqlite3 +0 -0
  116. data/spec/dummy/db/schema.rb +2 -3
  117. data/spec/dummy/db/test.sqlite3 +0 -0
  118. data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -19
  119. data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +19 -19
  120. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-53863-1jz1wlr.txt +147 -0
  121. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-55246-1rvhs1s.txt +147 -0
  122. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60268-1psjqua.txt +147 -0
  123. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60996-1cy28m2.txt +147 -0
  124. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-67507-19qjhj3.txt +147 -0
  125. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-69234-1cllrec.txt +147 -0
  126. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-76875-1os6joy.txt +147 -0
  127. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-1148-136brhb.txt +147 -0
  128. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-473-1c326dm.txt +147 -0
  129. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-93795-1x882ik.txt +147 -0
  130. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94274-1xr9d9e.txt +147 -0
  131. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94643-1fjcept.txt +147 -0
  132. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-97947-mfqh5b.txt +147 -0
  133. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98488-126cvb4.txt +147 -0
  134. data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98849-1lg47mm.txt +147 -0
  135. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  136. data/spec/dummy/solr/test/data/index/segments_5ur +0 -0
  137. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007580 +0 -0
  138. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007581 +0 -0
  139. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007582 +0 -0
  140. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007583 +0 -0
  141. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007584 +0 -0
  142. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007585 +0 -0
  143. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  144. data/spec/dummy/tmp/cache/stdout +2554 -0
  145. data/spec/dummy/tmp/pids/redis-test.pid +1 -1
  146. data/spec/fixtures/agent_import_results.yml +0 -3
  147. data/spec/fixtures/carrier_types.yml +16 -16
  148. data/spec/fixtures/content_types.yml +78 -29
  149. data/spec/fixtures/frequencies.yml +32 -62
  150. data/spec/fixtures/manifestations.yml +1 -1
  151. data/spec/models/agent_import_result_spec.rb +0 -2
  152. data/spec/models/manifestation_spec.rb +1 -1
  153. data/spec/models/resource_import_file_spec.rb +30 -3
  154. data/spec/views/manifestations/show.html.erb_spec.rb +1 -1
  155. metadata +68 -103
  156. data/app/views/picture_files/_index_event.html.erb +0 -53
  157. data/app/views/picture_files/_index_shelf.html.erb +0 -53
  158. data/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
  159. data/spec/dummy/solr/test/data/index/_20i.fdt +0 -0
  160. data/spec/dummy/solr/test/data/index/_20i.fdx +0 -0
  161. data/spec/dummy/solr/test/data/index/_20i.fnm +0 -0
  162. data/spec/dummy/solr/test/data/index/_20i.nvd +0 -0
  163. data/spec/dummy/solr/test/data/index/_20i.nvm +0 -0
  164. data/spec/dummy/solr/test/data/index/_20i.si +0 -0
  165. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.doc +0 -0
  166. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.pos +0 -0
  167. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tim +0 -0
  168. data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tip +0 -0
  169. data/spec/dummy/solr/test/data/index/_20j.fdt +0 -0
  170. data/spec/dummy/solr/test/data/index/_20j.fdx +0 -0
  171. data/spec/dummy/solr/test/data/index/_20j.fnm +0 -0
  172. data/spec/dummy/solr/test/data/index/_20j.nvd +0 -0
  173. data/spec/dummy/solr/test/data/index/_20j.nvm +0 -0
  174. data/spec/dummy/solr/test/data/index/_20j.si +0 -0
  175. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.doc +0 -0
  176. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.pos +0 -0
  177. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tim +0 -0
  178. data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tip +0 -0
  179. data/spec/dummy/solr/test/data/index/_20k.fdt +0 -0
  180. data/spec/dummy/solr/test/data/index/_20k.fdx +0 -0
  181. data/spec/dummy/solr/test/data/index/_20k.fnm +0 -0
  182. data/spec/dummy/solr/test/data/index/_20k.nvd +0 -0
  183. data/spec/dummy/solr/test/data/index/_20k.nvm +0 -0
  184. data/spec/dummy/solr/test/data/index/_20k.si +0 -0
  185. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.doc +0 -0
  186. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.pos +0 -0
  187. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tim +0 -0
  188. data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tip +0 -0
  189. data/spec/dummy/solr/test/data/index/segments_2uc +0 -0
  190. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003680 +0 -0
  191. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003681 +0 -0
  192. data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003682 +0 -0
@@ -17,7 +17,7 @@ describe ManifestationsController do
17
17
 
18
18
  it "assigns all manifestations as @manifestations" do
19
19
  get :index
20
- assigns(:manifestations).should_not be_nil
20
+ expect(assigns(:manifestations)).to_not be_nil
21
21
  end
22
22
  end
23
23
 
@@ -26,7 +26,7 @@ describe ManifestationsController do
26
26
 
27
27
  it "assigns all manifestations as @manifestations" do
28
28
  get :index
29
- assigns(:manifestations).should_not be_nil
29
+ expect(assigns(:manifestations)).to_not be_nil
30
30
  end
31
31
  end
32
32
 
@@ -35,131 +35,131 @@ describe ManifestationsController do
35
35
 
36
36
  it "assigns all manifestations as @manifestations" do
37
37
  get :index
38
- assigns(:manifestations).should_not be_nil
38
+ expect(assigns(:manifestations)).to_not be_nil
39
39
  end
40
40
  end
41
41
 
42
42
  describe "When not logged in" do
43
43
  it "assigns all manifestations as @manifestations" do
44
44
  get :index
45
- assigns(:manifestations).should_not be_nil
45
+ expect(assigns(:manifestations)).to_not be_nil
46
46
  end
47
47
 
48
48
  it "assigns all manifestations as @manifestations in xml format without operation" do
49
49
  get :index, :format => 'xml'
50
- response.should be_success
51
- assigns(:manifestations).should_not be_nil
50
+ expect(response).to be_success
51
+ expect(assigns(:manifestations)).to_not be_nil
52
52
  end
53
53
 
54
54
  it "assigns all manifestations as @manifestations in txt format without operation" do
55
55
  get :index, :format => 'txt'
56
- response.should be_success
57
- assigns(:manifestations).should_not be_nil
58
- response.should render_template('manifestations/index')
56
+ expect(response).to be_success
57
+ expect(assigns(:manifestations)).to_not be_nil
58
+ expect(response).to render_template('manifestations/index')
59
59
  end
60
60
 
61
61
  it "assigns all manifestations as @manifestations in sru format without operation" do
62
62
  get :index, :format => 'sru'
63
63
  assert_response :success
64
- assigns(:manifestations).should be_nil
65
- response.should render_template('manifestations/explain')
64
+ expect(assigns(:manifestations)).to be_nil
65
+ expect(response).to render_template('manifestations/explain')
66
66
  end
67
67
 
68
68
  it "assigns all manifestations as @manifestations in sru format with operation" do
69
69
  get :index, :format => 'sru', :operation => 'searchRetrieve', :query => 'ruby'
70
- assigns(:manifestations).should_not be_nil
71
- response.should render_template('manifestations/index')
70
+ expect(assigns(:manifestations)).to_not be_nil
71
+ expect(response).to render_template('manifestations/index')
72
72
  end
73
73
 
74
74
  it "assigns all manifestations as @manifestations in sru format with operation and title" do
75
75
  get :index, :format => 'sru', :query => 'title=ruby', :operation => 'searchRetrieve'
76
- assigns(:manifestations).should_not be_nil
77
- response.should render_template('manifestations/index')
76
+ expect(assigns(:manifestations)).to_not be_nil
77
+ expect(response).to render_template('manifestations/index')
78
78
  end
79
79
 
80
80
  it "assigns all manifestations as @manifestations in openurl" do
81
81
  get :index, :api => 'openurl', :title => 'ruby'
82
- assigns(:manifestations).should_not be_nil
82
+ expect(assigns(:manifestations)).to_not be_nil
83
83
  end
84
84
 
85
85
  it "assigns all manifestations as @manifestations when pub_date_from and pub_date_to are specified" do
86
86
  get :index, :pub_date_from => '2000', :pub_date_to => '2007'
87
87
  assigns(:query).should eq "date_of_publication_d:[#{Time.zone.parse('2000-01-01').utc.iso8601} TO #{Time.zone.parse('2007-12-31').end_of_year.utc.iso8601}]"
88
- assigns(:manifestations).should_not be_nil
88
+ expect(assigns(:manifestations)).to_not be_nil
89
89
  end
90
90
 
91
91
  it "assigns all manifestations as @manifestations when acquired_from and pub_date_to are specified" do
92
92
  get :index, :acquired_from => '2000', :acquired_to => '2007'
93
93
  assigns(:query).should eq "acquired_at_d:[#{Time.zone.parse('2000-01-01').utc.iso8601} TO #{Time.zone.parse('2007-12-31').end_of_day.utc.iso8601}]"
94
- assigns(:manifestations).should_not be_nil
94
+ expect(assigns(:manifestations)).to_not be_nil
95
95
  end
96
96
 
97
97
  it "assigns all manifestations as @manifestations when number_of_pages_at_least and number_of_pages_at_most are specified" do
98
98
  get :index, :number_of_pages_at_least => '100', :number_of_pages_at_least => '200'
99
- assigns(:manifestations).should_not be_nil
99
+ expect(assigns(:manifestations)).to_not be_nil
100
100
  end
101
101
 
102
102
  it "assigns all manifestations as @manifestations in mods format" do
103
103
  get :index, :format => 'mods'
104
- assigns(:manifestations).should_not be_nil
105
- response.should render_template("manifestations/index")
104
+ expect(assigns(:manifestations)).to_not be_nil
105
+ expect(response).to render_template("manifestations/index")
106
106
  end
107
107
 
108
108
  it "assigns all manifestations as @manifestations in rdf format" do
109
109
  get :index, :format => 'rdf'
110
- assigns(:manifestations).should_not be_nil
111
- response.should render_template("manifestations/index")
110
+ expect(assigns(:manifestations)).to_not be_nil
111
+ expect(response).to render_template("manifestations/index")
112
112
  end
113
113
 
114
114
  it "should get index with manifestation_id" do
115
115
  get :index, :manifestation_id => 1
116
- response.should be_success
117
- assigns(:manifestation).should eq Manifestation.find(1)
116
+ expect(response).to be_success
117
+ expect(assigns(:manifestation)).to eq Manifestation.find(1)
118
118
  assigns(:manifestations).collect(&:id).should eq assigns(:manifestation).derived_manifestations.collect(&:id)
119
119
  end
120
120
 
121
121
  it "should get index with query" do
122
122
  get :index, :query => '2005'
123
- response.should be_success
124
- assigns(:manifestations).should_not be_blank
123
+ expect(response).to be_success
124
+ expect(assigns(:manifestations)).to_not be_blank
125
125
  end
126
126
 
127
127
  it "should get index with page number" do
128
128
  get :index, :query => '2005', :number_of_pages_at_least => 1, :number_of_pages_at_most => 100
129
- response.should be_success
129
+ expect(response).to be_success
130
130
  assigns(:query).should eq '2005 number_of_pages_i:[1 TO 100]'
131
131
  end
132
132
 
133
133
  it "should get index with pub_date_from" do
134
134
  get :index, :query => '2005', :pub_date_from => '2000'
135
- response.should be_success
136
- assigns(:manifestations).should be_truthy
135
+ expect(response).to be_success
136
+ expect(assigns(:manifestations)).to be_truthy
137
137
  assigns(:query).should eq '2005 date_of_publication_d:[1999-12-31T15:00:00Z TO *]'
138
138
  end
139
139
 
140
140
  it "should get index with pub_date_to" do
141
141
  get :index, :query => '2005', :pub_date_to => '2000'
142
- response.should be_success
143
- assigns(:manifestations).should be_truthy
142
+ expect(response).to be_success
143
+ expect(assigns(:manifestations)).to be_truthy
144
144
  assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T14:59:59Z]'
145
145
  end
146
146
 
147
147
  it "should get tag_cloud" do
148
148
  get :index, :query => '2005', :view => 'tag_cloud'
149
- response.should be_success
150
- response.should render_template("manifestations/_tag_cloud")
149
+ expect(response).to be_success
150
+ expect(response).to render_template("manifestations/_tag_cloud")
151
151
  end
152
152
 
153
153
  it "should show manifestation with isbn", :solr => true do
154
154
  get :index, :isbn => "4798002062"
155
- response.should be_success
156
- assigns(:manifestations).count.should eq 1
155
+ expect(response).to be_success
156
+ expect(assigns(:manifestations).count).to eq 1
157
157
  end
158
158
 
159
159
  it "should not show missing manifestation with isbn", :solr => true do
160
160
  get :index, :isbn => "47980020620"
161
- response.should be_success
162
- assigns(:manifestations).should be_empty
161
+ expect(response).to be_success
162
+ expect(assigns(:manifestations)).to be_empty
163
163
  end
164
164
  end
165
165
  end
@@ -170,7 +170,7 @@ describe ManifestationsController do
170
170
 
171
171
  it "assigns the requested manifestation as @manifestation" do
172
172
  get :show, :id => 1
173
- assigns(:manifestation).should eq(Manifestation.find(1))
173
+ expect(assigns(:manifestation)).to eq(Manifestation.find(1))
174
174
  end
175
175
  end
176
176
 
@@ -179,13 +179,13 @@ describe ManifestationsController do
179
179
 
180
180
  it "assigns the requested manifestation as @manifestation" do
181
181
  get :show, :id => 1
182
- assigns(:manifestation).should eq(Manifestation.find(1))
182
+ expect(assigns(:manifestation)).to eq(Manifestation.find(1))
183
183
  end
184
184
 
185
185
  it "should show manifestation with agent who does not produce it" do
186
186
  get :show, :id => 3, :agent_id => 3
187
- assigns(:manifestation).should eq assigns(:agent).manifestations.find(3)
188
- response.should be_success
187
+ expect(assigns(:manifestation)).to eq assigns(:agent).manifestations.find(3)
188
+ expect(response).to be_success
189
189
  end
190
190
  end
191
191
 
@@ -194,70 +194,70 @@ describe ManifestationsController do
194
194
 
195
195
  it "assigns the requested manifestation as @manifestation" do
196
196
  get :show, :id => 1
197
- assigns(:manifestation).should eq(Manifestation.find(1))
197
+ expect(assigns(:manifestation)).to eq(Manifestation.find(1))
198
198
  end
199
199
 
200
200
  it "should send manifestation detail email" do
201
201
  get :show, :id => 1, :mode => 'send_email'
202
- response.should redirect_to manifestation_url(assigns(:manifestation))
202
+ expect(response).to redirect_to manifestation_url(assigns(:manifestation))
203
203
  end
204
204
 
205
205
  #it "should show myself" do
206
206
  # get :show, :id => users(:user1).agent
207
- # response.should be_success
207
+ # expect(response).to be_success
208
208
  #end
209
209
  end
210
210
 
211
211
  describe "When not logged in" do
212
212
  it "assigns the requested manifestation as @manifestation" do
213
213
  get :show, :id => 1
214
- assigns(:manifestation).should eq(Manifestation.find(1))
214
+ expect(assigns(:manifestation)).to eq(Manifestation.find(1))
215
215
  end
216
216
 
217
217
  it "guest should show manifestation mods template" do
218
218
  get :show, :id => 22, :format => 'mods'
219
- assigns(:manifestation).should eq Manifestation.find(22)
220
- response.should render_template("manifestations/show")
219
+ expect(assigns(:manifestation)).to eq Manifestation.find(22)
220
+ expect(response).to render_template("manifestations/show")
221
221
  end
222
222
 
223
223
  it "should show manifestation rdf template" do
224
224
  get :show, :id => 22, :format => 'rdf'
225
- assigns(:manifestation).should eq Manifestation.find(22)
226
- response.should render_template("manifestations/show")
225
+ expect(assigns(:manifestation)).to eq Manifestation.find(22)
226
+ expect(response).to render_template("manifestations/show")
227
227
  end
228
228
 
229
229
  it "should show manifestation with holding" do
230
230
  get :show, :id => 1, :mode => 'holding'
231
- response.should be_success
231
+ expect(response).to be_success
232
232
  end
233
233
 
234
234
  it "should show manifestation with tag_edit" do
235
235
  get :show, :id => 1, :mode => 'tag_edit'
236
- response.should render_template('manifestations/_tag_edit')
237
- response.should be_success
236
+ expect(response).to render_template('manifestations/_tag_edit')
237
+ expect(response).to be_success
238
238
  end
239
239
 
240
240
  it "should show manifestation with tag_list" do
241
241
  get :show, :id => 1, :mode => 'tag_list'
242
- response.should render_template('manifestations/_tag_list')
243
- response.should be_success
242
+ expect(response).to render_template('manifestations/_tag_list')
243
+ expect(response).to be_success
244
244
  end
245
245
 
246
246
  it "should show manifestation with show_creators" do
247
247
  get :show, :id => 1, :mode => 'show_creators'
248
- response.should render_template('manifestations/_show_creators')
249
- response.should be_success
248
+ expect(response).to render_template('manifestations/_show_creators')
249
+ expect(response).to be_success
250
250
  end
251
251
 
252
252
  it "should show manifestation with show_all_creators" do
253
253
  get :show, :id => 1, :mode => 'show_all_creators'
254
- response.should render_template('manifestations/_show_creators')
255
- response.should be_success
254
+ expect(response).to render_template('manifestations/_show_creators')
255
+ expect(response).to be_success
256
256
  end
257
257
 
258
258
  it "should not send manifestation's detail email" do
259
259
  get :show, :id => 1, :mode => 'send_email'
260
- response.should redirect_to new_user_session_url
260
+ expect(response).to redirect_to new_user_session_url
261
261
  end
262
262
  end
263
263
  end
@@ -268,17 +268,17 @@ describe ManifestationsController do
268
268
 
269
269
  it "assigns the requested manifestation as @manifestation" do
270
270
  get :new
271
- assigns(:manifestation).should_not be_valid
271
+ expect(assigns(:manifestation)).to_not be_valid
272
272
  end
273
273
 
274
274
  it "should get new template without expression_id" do
275
275
  get :new
276
- response.should be_success
276
+ expect(response).to be_success
277
277
  end
278
278
 
279
279
  it "should get new template with expression_id" do
280
280
  get :new, :expression_id => 1
281
- response.should be_success
281
+ expect(response).to be_success
282
282
  end
283
283
  end
284
284
 
@@ -287,17 +287,17 @@ describe ManifestationsController do
287
287
 
288
288
  it "assigns the requested manifestation as @manifestation" do
289
289
  get :new
290
- assigns(:manifestation).should_not be_valid
290
+ expect(assigns(:manifestation)).to_not be_valid
291
291
  end
292
292
 
293
293
  it "should get new template without expression_id" do
294
294
  get :new
295
- response.should be_success
295
+ expect(response).to be_success
296
296
  end
297
297
 
298
298
  it "should get new template with expression_id" do
299
299
  get :new, :expression_id => 1
300
- response.should be_success
300
+ expect(response).to be_success
301
301
  end
302
302
  end
303
303
 
@@ -306,16 +306,16 @@ describe ManifestationsController do
306
306
 
307
307
  it "should not assign the requested manifestation as @manifestation" do
308
308
  get :new
309
- assigns(:manifestation).should_not be_valid
310
- response.should be_forbidden
309
+ expect(assigns(:manifestation)).to_not be_valid
310
+ expect(response).to be_forbidden
311
311
  end
312
312
  end
313
313
 
314
314
  describe "When not logged in" do
315
315
  it "should not assign the requested manifestation as @manifestation" do
316
316
  get :new
317
- assigns(:manifestation).should_not be_valid
318
- response.should redirect_to(new_user_session_url)
317
+ expect(assigns(:manifestation)).to_not be_valid
318
+ expect(response).to redirect_to(new_user_session_url)
319
319
  end
320
320
  end
321
321
  end
@@ -327,7 +327,7 @@ describe ManifestationsController do
327
327
  it "assigns the requested manifestation as @manifestation" do
328
328
  manifestation = FactoryGirl.create(:manifestation)
329
329
  get :edit, :id => manifestation.id
330
- assigns(:manifestation).should eq(manifestation)
330
+ expect(assigns(:manifestation)).to eq(manifestation)
331
331
  end
332
332
  end
333
333
 
@@ -337,7 +337,7 @@ describe ManifestationsController do
337
337
  it "assigns the requested manifestation as @manifestation" do
338
338
  manifestation = FactoryGirl.create(:manifestation)
339
339
  get :edit, :id => manifestation.id
340
- assigns(:manifestation).should eq(manifestation)
340
+ expect(assigns(:manifestation)).to eq(manifestation)
341
341
  end
342
342
  end
343
343
 
@@ -347,12 +347,12 @@ describe ManifestationsController do
347
347
  it "assigns the requested manifestation as @manifestation" do
348
348
  manifestation = FactoryGirl.create(:manifestation)
349
349
  get :edit, :id => manifestation.id
350
- response.should be_forbidden
350
+ expect(response).to be_forbidden
351
351
  end
352
352
 
353
353
  it "should edit manifestation with tag_edit" do
354
354
  get :edit, :id => 1, :mode => 'tag_edit'
355
- response.should be_success
355
+ expect(response).to be_success
356
356
  end
357
357
  end
358
358
 
@@ -360,7 +360,7 @@ describe ManifestationsController do
360
360
  it "should not assign the requested manifestation as @manifestation" do
361
361
  manifestation = FactoryGirl.create(:manifestation)
362
362
  get :edit, :id => manifestation.id
363
- response.should redirect_to(new_user_session_url)
363
+ expect(response).to redirect_to(new_user_session_url)
364
364
  end
365
365
  end
366
366
  end
@@ -377,7 +377,7 @@ describe ManifestationsController do
377
377
  describe "with valid params" do
378
378
  it "assigns a newly created manifestation as @manifestation" do
379
379
  post :create, :manifestation => @attrs
380
- assigns(:manifestation).should be_valid
380
+ expect(assigns(:manifestation)).to be_valid
381
381
  end
382
382
 
383
383
  it "assigns a series_statement" do
@@ -388,19 +388,19 @@ describe ManifestationsController do
388
388
 
389
389
  it "redirects to the created manifestation" do
390
390
  post :create, :manifestation => @attrs
391
- response.should redirect_to(manifestation_url(assigns(:manifestation)))
391
+ expect(response).to redirect_to(manifestation_url(assigns(:manifestation)))
392
392
  end
393
393
  end
394
394
 
395
395
  describe "with invalid params" do
396
396
  it "assigns a newly created but unsaved manifestation as @manifestation" do
397
397
  post :create, :manifestation => @invalid_attrs
398
- assigns(:manifestation).should_not be_valid
398
+ expect(assigns(:manifestation)).to_not be_valid
399
399
  end
400
400
 
401
401
  it "re-renders the 'new' template" do
402
402
  post :create, :manifestation => @invalid_attrs
403
- response.should render_template("new")
403
+ expect(response).to render_template("new")
404
404
  end
405
405
  end
406
406
  end
@@ -411,24 +411,24 @@ describe ManifestationsController do
411
411
  describe "with valid params" do
412
412
  it "assigns a newly created manifestation as @manifestation" do
413
413
  post :create, :manifestation => @attrs
414
- assigns(:manifestation).should be_valid
414
+ expect(assigns(:manifestation)).to be_valid
415
415
  end
416
416
 
417
417
  it "redirects to the created manifestation" do
418
418
  post :create, :manifestation => @attrs
419
- response.should redirect_to(manifestation_url(assigns(:manifestation)))
419
+ expect(response).to redirect_to(manifestation_url(assigns(:manifestation)))
420
420
  end
421
421
  end
422
422
 
423
423
  describe "with invalid params" do
424
424
  it "assigns a newly created but unsaved manifestation as @manifestation" do
425
425
  post :create, :manifestation => @invalid_attrs
426
- assigns(:manifestation).should_not be_valid
426
+ expect(assigns(:manifestation)).to_not be_valid
427
427
  end
428
428
 
429
429
  it "re-renders the 'new' template" do
430
430
  post :create, :manifestation => @invalid_attrs
431
- response.should render_template("new")
431
+ expect(response).to render_template("new")
432
432
  end
433
433
  end
434
434
  end
@@ -439,24 +439,24 @@ describe ManifestationsController do
439
439
  describe "with valid params" do
440
440
  it "assigns a newly created manifestation as @manifestation" do
441
441
  post :create, :manifestation => @attrs
442
- assigns(:manifestation).should be_valid
442
+ expect(assigns(:manifestation)).to be_valid
443
443
  end
444
444
 
445
445
  it "should be forbidden" do
446
446
  post :create, :manifestation => @attrs
447
- response.should be_forbidden
447
+ expect(response).to be_forbidden
448
448
  end
449
449
  end
450
450
 
451
451
  describe "with invalid params" do
452
452
  it "assigns a newly created but unsaved manifestation as @manifestation" do
453
453
  post :create, :manifestation => @invalid_attrs
454
- assigns(:manifestation).should_not be_valid
454
+ expect(assigns(:manifestation)).to_not be_valid
455
455
  end
456
456
 
457
457
  it "should be forbidden" do
458
458
  post :create, :manifestation => @invalid_attrs
459
- response.should be_forbidden
459
+ expect(response).to be_forbidden
460
460
  end
461
461
  end
462
462
  end
@@ -465,24 +465,24 @@ describe ManifestationsController do
465
465
  describe "with valid params" do
466
466
  it "assigns a newly created manifestation as @manifestation" do
467
467
  post :create, :manifestation => @attrs
468
- assigns(:manifestation).should be_valid
468
+ expect(assigns(:manifestation)).to be_valid
469
469
  end
470
470
 
471
471
  it "should be forbidden" do
472
472
  post :create, :manifestation => @attrs
473
- response.should redirect_to(new_user_session_url)
473
+ expect(response).to redirect_to(new_user_session_url)
474
474
  end
475
475
  end
476
476
 
477
477
  describe "with invalid params" do
478
478
  it "assigns a newly created but unsaved manifestation as @manifestation" do
479
479
  post :create, :manifestation => @invalid_attrs
480
- assigns(:manifestation).should_not be_valid
480
+ expect(assigns(:manifestation)).to_not be_valid
481
481
  end
482
482
 
483
483
  it "should be forbidden" do
484
484
  post :create, :manifestation => @invalid_attrs
485
- response.should redirect_to(new_user_session_url)
485
+ expect(response).to redirect_to(new_user_session_url)
486
486
  end
487
487
  end
488
488
  end
@@ -512,14 +512,14 @@ describe ManifestationsController do
512
512
 
513
513
  it "assigns the requested manifestation as @manifestation" do
514
514
  put :update, :id => @manifestation.id, :manifestation => @attrs
515
- assigns(:manifestation).should eq(@manifestation)
515
+ expect(assigns(:manifestation)).to eq(@manifestation)
516
516
  end
517
517
  end
518
518
 
519
519
  describe "with invalid params" do
520
520
  it "assigns the requested manifestation as @manifestation" do
521
521
  put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
522
- response.should render_template("edit")
522
+ expect(response).to render_template("edit")
523
523
  end
524
524
  end
525
525
  end
@@ -534,20 +534,20 @@ describe ManifestationsController do
534
534
 
535
535
  it "assigns the requested manifestation as @manifestation" do
536
536
  put :update, :id => @manifestation.id, :manifestation => @attrs
537
- assigns(:manifestation).should eq(@manifestation)
538
- response.should redirect_to(@manifestation)
537
+ expect(assigns(:manifestation)).to eq(@manifestation)
538
+ expect(response).to redirect_to(@manifestation)
539
539
  end
540
540
  end
541
541
 
542
542
  describe "with invalid params" do
543
543
  it "assigns the manifestation as @manifestation" do
544
544
  put :update, :id => @manifestation, :manifestation => @invalid_attrs
545
- assigns(:manifestation).should_not be_valid
545
+ expect(assigns(:manifestation)).to_not be_valid
546
546
  end
547
547
 
548
548
  it "re-renders the 'edit' template" do
549
549
  put :update, :id => @manifestation, :manifestation => @invalid_attrs
550
- response.should render_template("edit")
550
+ expect(response).to render_template("edit")
551
551
  end
552
552
  end
553
553
  end
@@ -562,15 +562,15 @@ describe ManifestationsController do
562
562
 
563
563
  it "assigns the requested manifestation as @manifestation" do
564
564
  put :update, :id => @manifestation.id, :manifestation => @attrs
565
- assigns(:manifestation).should eq(@manifestation)
566
- response.should be_forbidden
565
+ expect(assigns(:manifestation)).to eq(@manifestation)
566
+ expect(response).to be_forbidden
567
567
  end
568
568
  end
569
569
 
570
570
  describe "with invalid params" do
571
571
  it "assigns the requested manifestation as @manifestation" do
572
572
  put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
573
- response.should be_forbidden
573
+ expect(response).to be_forbidden
574
574
  end
575
575
  end
576
576
  end
@@ -583,14 +583,14 @@ describe ManifestationsController do
583
583
 
584
584
  it "should be forbidden" do
585
585
  put :update, :id => @manifestation.id, :manifestation => @attrs
586
- response.should redirect_to(new_user_session_url)
586
+ expect(response).to redirect_to(new_user_session_url)
587
587
  end
588
588
  end
589
589
 
590
590
  describe "with invalid params" do
591
591
  it "assigns the requested manifestation as @manifestation" do
592
592
  put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
593
- response.should redirect_to(new_user_session_url)
593
+ expect(response).to redirect_to(new_user_session_url)
594
594
  end
595
595
  end
596
596
  end
@@ -610,17 +610,17 @@ describe ManifestationsController do
610
610
 
611
611
  it "redirects to the manifestations list" do
612
612
  delete :destroy, :id => @manifestation.id
613
- response.should redirect_to(manifestations_url)
613
+ expect(response).to redirect_to(manifestations_url)
614
614
  end
615
615
 
616
616
  it "should not destroy the reserved manifestation" do
617
617
  delete :destroy, :id => 2
618
- response.should be_forbidden
618
+ expect(response).to be_forbidden
619
619
  end
620
620
 
621
621
  it "should not destroy manifestation contains items" do
622
622
  delete :destroy, :id => 1
623
- response.should be_forbidden
623
+ expect(response).to be_forbidden
624
624
  end
625
625
  end
626
626
 
@@ -633,7 +633,7 @@ describe ManifestationsController do
633
633
 
634
634
  it "should be forbidden" do
635
635
  delete :destroy, :id => @manifestation.id
636
- response.should redirect_to(manifestations_url)
636
+ expect(response).to redirect_to(manifestations_url)
637
637
  end
638
638
  end
639
639
 
@@ -646,7 +646,7 @@ describe ManifestationsController do
646
646
 
647
647
  it "should be forbidden" do
648
648
  delete :destroy, :id => @manifestation.id
649
- response.should be_forbidden
649
+ expect(response).to be_forbidden
650
650
  end
651
651
  end
652
652
 
@@ -657,7 +657,7 @@ describe ManifestationsController do
657
657
 
658
658
  it "should be forbidden" do
659
659
  delete :destroy, :id => @manifestation.id
660
- response.should redirect_to(new_user_session_url)
660
+ expect(response).to redirect_to(new_user_session_url)
661
661
  end
662
662
  end
663
663
  end