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
@@ -33,7 +33,7 @@ describe IdentifierTypesController do
33
33
  it "assigns all identifier_types as @identifier_types" do
34
34
  identifier_type = IdentifierType.create! valid_attributes
35
35
  get :index
36
- assigns(:identifier_types).should eq(IdentifierType.all)
36
+ expect(assigns(:identifier_types)).to eq(IdentifierType.all)
37
37
  end
38
38
  end
39
39
 
@@ -41,14 +41,14 @@ describe IdentifierTypesController do
41
41
  it "assigns the requested identifier_type as @identifier_type" do
42
42
  identifier_type = IdentifierType.create! valid_attributes
43
43
  get :show, :id => identifier_type.id
44
- assigns(:identifier_type).should eq(identifier_type)
44
+ expect(assigns(:identifier_type)).to eq(identifier_type)
45
45
  end
46
46
  end
47
47
 
48
48
  describe "GET new" do
49
49
  it "assigns a new identifier_type as @identifier_type" do
50
50
  get :new
51
- assigns(:identifier_type).should be_a_new(IdentifierType)
51
+ expect(assigns(:identifier_type)).to be_a_new(IdentifierType)
52
52
  end
53
53
  end
54
54
 
@@ -56,7 +56,7 @@ describe IdentifierTypesController do
56
56
  it "assigns the requested identifier_type as @identifier_type" do
57
57
  identifier_type = IdentifierType.create! valid_attributes
58
58
  get :edit, :id => identifier_type.id
59
- assigns(:identifier_type).should eq(identifier_type)
59
+ expect(assigns(:identifier_type)).to eq(identifier_type)
60
60
  end
61
61
  end
62
62
 
@@ -70,13 +70,13 @@ describe IdentifierTypesController do
70
70
 
71
71
  it "assigns a newly created identifier_type as @identifier_type" do
72
72
  post :create, :identifier_type => valid_attributes
73
- assigns(:identifier_type).should be_a(IdentifierType)
74
- assigns(:identifier_type).should be_persisted
73
+ expect(assigns(:identifier_type)).to be_a(IdentifierType)
74
+ expect(assigns(:identifier_type)).to be_persisted
75
75
  end
76
76
 
77
77
  it "redirects to the created identifier_type" do
78
78
  post :create, :identifier_type => valid_attributes
79
- response.should redirect_to(IdentifierType.last)
79
+ expect(response).to redirect_to(IdentifierType.last)
80
80
  end
81
81
  end
82
82
 
@@ -85,14 +85,14 @@ describe IdentifierTypesController do
85
85
  # Trigger the behavior that occurs when invalid params are submitted
86
86
  IdentifierType.any_instance.stub(:save).and_return(false)
87
87
  post :create, :identifier_type => {}
88
- assigns(:identifier_type).should be_a_new(IdentifierType)
88
+ expect(assigns(:identifier_type)).to be_a_new(IdentifierType)
89
89
  end
90
90
 
91
91
  it "re-renders the 'new' template" do
92
92
  # Trigger the behavior that occurs when invalid params are submitted
93
93
  IdentifierType.any_instance.stub(:save).and_return(false)
94
94
  post :create, :identifier_type => {}
95
- #response.should render_template("new")
95
+ #expect(response).to render_template("new")
96
96
  end
97
97
  end
98
98
  end
@@ -112,20 +112,20 @@ describe IdentifierTypesController do
112
112
  it "assigns the requested identifier_type as @identifier_type" do
113
113
  identifier_type = IdentifierType.create! valid_attributes
114
114
  put :update, :id => identifier_type.id, :identifier_type => valid_attributes
115
- assigns(:identifier_type).should eq(identifier_type)
115
+ expect(assigns(:identifier_type)).to eq(identifier_type)
116
116
  end
117
117
 
118
118
  it "redirects to the identifier_type" do
119
119
  identifier_type = IdentifierType.create! valid_attributes
120
120
  put :update, :id => identifier_type.id, :identifier_type => valid_attributes
121
- response.should redirect_to(identifier_type)
121
+ expect(response).to redirect_to(identifier_type)
122
122
  end
123
123
 
124
124
  it "moves its position when specified" do
125
125
  identifier_type = IdentifierType.create! valid_attributes
126
126
  position = identifier_type.position
127
127
  put :update, :id => identifier_type.id, :move => 'higher'
128
- response.should redirect_to identifier_types_url
128
+ expect(response).to redirect_to identifier_types_url
129
129
  assigns(:identifier_type).position.should eq position - 1
130
130
  end
131
131
  end
@@ -136,7 +136,7 @@ describe IdentifierTypesController do
136
136
  # Trigger the behavior that occurs when invalid params are submitted
137
137
  IdentifierType.any_instance.stub(:save).and_return(false)
138
138
  put :update, :id => identifier_type.id, :identifier_type => {}
139
- assigns(:identifier_type).should eq(identifier_type)
139
+ expect(assigns(:identifier_type)).to eq(identifier_type)
140
140
  end
141
141
 
142
142
  it "re-renders the 'edit' template" do
@@ -144,7 +144,7 @@ describe IdentifierTypesController do
144
144
  # Trigger the behavior that occurs when invalid params are submitted
145
145
  IdentifierType.any_instance.stub(:save).and_return(false)
146
146
  put :update, :id => identifier_type.id, :identifier_type => {}
147
- #response.should render_template("edit")
147
+ #expect(response).to render_template("edit")
148
148
  end
149
149
  end
150
150
  end
@@ -160,7 +160,7 @@ describe IdentifierTypesController do
160
160
  it "redirects to the identifier_types list" do
161
161
  identifier_type = IdentifierType.create! valid_attributes
162
162
  delete :destroy, :id => identifier_type.id
163
- response.should redirect_to(identifier_types_url)
163
+ expect(response).to redirect_to(identifier_types_url)
164
164
  end
165
165
  end
166
166
 
@@ -11,7 +11,7 @@ describe ImportRequestsController do
11
11
 
12
12
  it "assigns all import_requests as @import_requests" do
13
13
  get :index
14
- assigns(:import_requests).should eq(ImportRequest.all)
14
+ expect(assigns(:import_requests)).to eq(ImportRequest.all)
15
15
  end
16
16
  end
17
17
 
@@ -20,7 +20,7 @@ describe ImportRequestsController do
20
20
 
21
21
  it "assigns all import_requests as @import_requests" do
22
22
  get :index
23
- assigns(:import_requests).should eq(ImportRequest.all)
23
+ expect(assigns(:import_requests)).to eq(ImportRequest.all)
24
24
  end
25
25
  end
26
26
 
@@ -29,14 +29,14 @@ describe ImportRequestsController do
29
29
 
30
30
  it "assigns empty as @import_requests" do
31
31
  get :index
32
- assigns(:import_requests).should be_empty
32
+ expect(assigns(:import_requests)).to be_empty
33
33
  end
34
34
  end
35
35
 
36
36
  describe "When not logged in" do
37
37
  it "assigns empty as @import_requests" do
38
38
  get :index
39
- assigns(:import_requests).should be_empty
39
+ expect(assigns(:import_requests)).to be_empty
40
40
  end
41
41
  end
42
42
  end
@@ -48,7 +48,7 @@ describe ImportRequestsController do
48
48
  it "assigns the requested import_request as @import_request" do
49
49
  import_request = import_requests(:one)
50
50
  get :show, :id => import_request.id
51
- assigns(:import_request).should eq(import_request)
51
+ expect(assigns(:import_request)).to eq(import_request)
52
52
  end
53
53
  end
54
54
 
@@ -58,7 +58,7 @@ describe ImportRequestsController do
58
58
  it "assigns the requested import_request as @import_request" do
59
59
  import_request = import_requests(:one)
60
60
  get :show, :id => import_request.id
61
- assigns(:import_request).should eq(import_request)
61
+ expect(assigns(:import_request)).to eq(import_request)
62
62
  end
63
63
  end
64
64
 
@@ -68,7 +68,7 @@ describe ImportRequestsController do
68
68
  it "assigns the requested import_request as @import_request" do
69
69
  import_request = import_requests(:one)
70
70
  get :show, :id => import_request.id
71
- assigns(:import_request).should eq(import_request)
71
+ expect(assigns(:import_request)).to eq(import_request)
72
72
  end
73
73
  end
74
74
 
@@ -76,7 +76,7 @@ describe ImportRequestsController do
76
76
  it "assigns the requested import_request as @import_request" do
77
77
  import_request = import_requests(:one)
78
78
  get :show, :id => import_request.id
79
- assigns(:import_request).should eq(import_request)
79
+ expect(assigns(:import_request)).to eq(import_request)
80
80
  end
81
81
  end
82
82
  end
@@ -87,7 +87,7 @@ describe ImportRequestsController do
87
87
 
88
88
  it "assigns the requested import_request as @import_request" do
89
89
  get :new
90
- assigns(:import_request).should_not be_valid
90
+ expect(assigns(:import_request)).to_not be_valid
91
91
  end
92
92
  end
93
93
 
@@ -96,7 +96,7 @@ describe ImportRequestsController do
96
96
 
97
97
  it "assigns the requested import_request as @import_request" do
98
98
  get :new
99
- assigns(:import_request).should_not be_valid
99
+ expect(assigns(:import_request)).to_not be_valid
100
100
  end
101
101
  end
102
102
 
@@ -105,16 +105,16 @@ describe ImportRequestsController do
105
105
 
106
106
  it "should not assign the requested import_request as @import_request" do
107
107
  get :new
108
- assigns(:import_request).should_not be_valid
109
- response.should be_forbidden
108
+ expect(assigns(:import_request)).to_not be_valid
109
+ expect(response).to be_forbidden
110
110
  end
111
111
  end
112
112
 
113
113
  describe "When not logged in" do
114
114
  it "should not assign the requested import_request as @import_request" do
115
115
  get :new
116
- assigns(:import_request).should_not be_valid
117
- response.should redirect_to(new_user_session_url)
116
+ expect(assigns(:import_request)).to_not be_valid
117
+ expect(response).to redirect_to(new_user_session_url)
118
118
  end
119
119
  end
120
120
  end
@@ -126,7 +126,7 @@ describe ImportRequestsController do
126
126
  it "assigns the requested import_request as @import_request" do
127
127
  import_request = FactoryGirl.create(:import_request, :isbn => '9784797350999')
128
128
  get :edit, :id => import_request.id
129
- assigns(:import_request).should eq(import_request)
129
+ expect(assigns(:import_request)).to eq(import_request)
130
130
  end
131
131
  end
132
132
 
@@ -136,7 +136,7 @@ describe ImportRequestsController do
136
136
  it "assigns the requested import_request as @import_request" do
137
137
  import_request = FactoryGirl.create(:import_request, :isbn => '9784797350999')
138
138
  get :edit, :id => import_request.id
139
- assigns(:import_request).should eq(import_request)
139
+ expect(assigns(:import_request)).to eq(import_request)
140
140
  end
141
141
  end
142
142
 
@@ -146,7 +146,7 @@ describe ImportRequestsController do
146
146
  it "assigns the requested import_request as @import_request" do
147
147
  import_request = FactoryGirl.create(:import_request, :isbn => '9784797350999')
148
148
  get :edit, :id => import_request.id
149
- response.should be_forbidden
149
+ expect(response).to be_forbidden
150
150
  end
151
151
  end
152
152
 
@@ -154,7 +154,7 @@ describe ImportRequestsController do
154
154
  it "should not assign the requested import_request as @import_request" do
155
155
  import_request = FactoryGirl.create(:import_request, :isbn => '9784797350999')
156
156
  get :edit, :id => import_request.id
157
- response.should redirect_to(new_user_session_url)
157
+ expect(response).to redirect_to(new_user_session_url)
158
158
  end
159
159
  end
160
160
  end
@@ -176,31 +176,31 @@ describe ImportRequestsController do
176
176
 
177
177
  it "redirects to the created import_request" do
178
178
  post :create, :import_request => @attrs
179
- response.should redirect_to manifestation_url(assigns(:import_request).manifestation)
179
+ expect(response).to redirect_to manifestation_url(assigns(:import_request).manifestation)
180
180
  end
181
181
  end
182
182
 
183
183
  describe "with invalid params" do
184
184
  it "assigns a newly created but unsaved import_request as @import_request" do
185
185
  post :create, :import_request => @invalid_attrs
186
- assigns(:import_request).should_not be_valid
186
+ expect(assigns(:import_request)).to_not be_valid
187
187
  end
188
188
 
189
189
  it "re-renders the 'new' template" do
190
190
  post :create, :import_request => @invalid_attrs
191
- response.should render_template("new")
191
+ expect(response).to render_template("new")
192
192
  end
193
193
  end
194
194
 
195
195
  describe "with isbn which is already imported" do
196
196
  it "assigns a newly created import_request as @import_request" do
197
197
  post :create, :import_request => {:isbn => manifestations(:manifestation_00001).identifier_contents(:isbn).first}
198
- assigns(:import_request).should be_valid
198
+ expect(assigns(:import_request)).to be_valid
199
199
  end
200
200
 
201
201
  it "redirects to the created import_request", :vcr => true do
202
202
  post :create, :import_request => @attrs
203
- response.should redirect_to manifestation_url(assigns(:import_request).manifestation)
203
+ expect(response).to redirect_to manifestation_url(assigns(:import_request).manifestation)
204
204
  end
205
205
  end
206
206
  end
@@ -211,24 +211,24 @@ describe ImportRequestsController do
211
211
  describe "with valid params", :vcr => true do
212
212
  it "assigns a newly created import_request as @import_request" do
213
213
  post :create, :import_request => @attrs
214
- assigns(:import_request).should be_valid
214
+ expect(assigns(:import_request)).to be_valid
215
215
  end
216
216
 
217
217
  it "redirects to the created import_request" do
218
218
  post :create, :import_request => @attrs
219
- response.should redirect_to manifestation_url(assigns(:import_request).manifestation)
219
+ expect(response).to redirect_to manifestation_url(assigns(:import_request).manifestation)
220
220
  end
221
221
  end
222
222
 
223
223
  describe "with invalid params" do
224
224
  it "assigns a newly created but unsaved import_request as @import_request" do
225
225
  post :create, :import_request => @invalid_attrs
226
- assigns(:import_request).should_not be_valid
226
+ expect(assigns(:import_request)).to_not be_valid
227
227
  end
228
228
 
229
229
  it "re-renders the 'new' template" do
230
230
  post :create, :import_request => @invalid_attrs
231
- response.should render_template("new")
231
+ expect(response).to render_template("new")
232
232
  end
233
233
  end
234
234
  end
@@ -239,24 +239,24 @@ describe ImportRequestsController do
239
239
  describe "with valid params" do
240
240
  it "assigns a newly created import_request as @import_request" do
241
241
  post :create, :import_request => @attrs
242
- assigns(:import_request).should be_valid
242
+ expect(assigns(:import_request)).to be_valid
243
243
  end
244
244
 
245
245
  it "should be forbidden" do
246
246
  post :create, :import_request => @attrs
247
- response.should be_forbidden
247
+ expect(response).to be_forbidden
248
248
  end
249
249
  end
250
250
 
251
251
  describe "with invalid params" do
252
252
  it "assigns a newly created but unsaved import_request as @import_request" do
253
253
  post :create, :import_request => @invalid_attrs
254
- assigns(:import_request).should_not be_valid
254
+ expect(assigns(:import_request)).to_not be_valid
255
255
  end
256
256
 
257
257
  it "should be forbidden" do
258
258
  post :create, :import_request => @invalid_attrs
259
- response.should be_forbidden
259
+ expect(response).to be_forbidden
260
260
  end
261
261
  end
262
262
  end
@@ -265,24 +265,24 @@ describe ImportRequestsController do
265
265
  describe "with valid params" do
266
266
  it "assigns a newly created import_request as @import_request" do
267
267
  post :create, :import_request => @attrs
268
- assigns(:import_request).should be_valid
268
+ expect(assigns(:import_request)).to be_valid
269
269
  end
270
270
 
271
271
  it "should be forbidden" do
272
272
  post :create, :import_request => @attrs
273
- response.should redirect_to(new_user_session_url)
273
+ expect(response).to redirect_to(new_user_session_url)
274
274
  end
275
275
  end
276
276
 
277
277
  describe "with invalid params" do
278
278
  it "assigns a newly created but unsaved import_request as @import_request" do
279
279
  post :create, :import_request => @invalid_attrs
280
- assigns(:import_request).should_not be_valid
280
+ expect(assigns(:import_request)).to_not be_valid
281
281
  end
282
282
 
283
283
  it "should be forbidden" do
284
284
  post :create, :import_request => @invalid_attrs
285
- response.should redirect_to(new_user_session_url)
285
+ expect(response).to redirect_to(new_user_session_url)
286
286
  end
287
287
  end
288
288
  end
@@ -305,14 +305,14 @@ describe ImportRequestsController do
305
305
 
306
306
  it "assigns the requested import_request as @import_request" do
307
307
  put :update, :id => @import_request.id, :import_request => @attrs
308
- assigns(:import_request).should eq(@import_request)
308
+ expect(assigns(:import_request)).to eq(@import_request)
309
309
  end
310
310
  end
311
311
 
312
312
  describe "with invalid params" do
313
313
  it "assigns the requested import_request as @import_request" do
314
314
  put :update, :id => @import_request.id, :import_request => @invalid_attrs
315
- response.should render_template("edit")
315
+ expect(response).to render_template("edit")
316
316
  end
317
317
  end
318
318
  end
@@ -327,20 +327,20 @@ describe ImportRequestsController do
327
327
 
328
328
  it "assigns the requested import_request as @import_request" do
329
329
  put :update, :id => @import_request.id, :import_request => @attrs
330
- assigns(:import_request).should eq(@import_request)
331
- response.should redirect_to(@import_request)
330
+ expect(assigns(:import_request)).to eq(@import_request)
331
+ expect(response).to redirect_to(@import_request)
332
332
  end
333
333
  end
334
334
 
335
335
  describe "with invalid params" do
336
336
  it "assigns the import_request as @import_request" do
337
337
  put :update, :id => @import_request, :import_request => @invalid_attrs
338
- assigns(:import_request).should_not be_valid
338
+ expect(assigns(:import_request)).to_not be_valid
339
339
  end
340
340
 
341
341
  it "re-renders the 'edit' template" do
342
342
  put :update, :id => @import_request, :import_request => @invalid_attrs
343
- response.should render_template("edit")
343
+ expect(response).to render_template("edit")
344
344
  end
345
345
  end
346
346
  end
@@ -355,15 +355,15 @@ describe ImportRequestsController do
355
355
 
356
356
  it "assigns the requested import_request as @import_request" do
357
357
  put :update, :id => @import_request.id, :import_request => @attrs
358
- assigns(:import_request).should eq(@import_request)
359
- response.should be_forbidden
358
+ expect(assigns(:import_request)).to eq(@import_request)
359
+ expect(response).to be_forbidden
360
360
  end
361
361
  end
362
362
 
363
363
  describe "with invalid params" do
364
364
  it "assigns the requested import_request as @import_request" do
365
365
  put :update, :id => @import_request.id, :import_request => @invalid_attrs
366
- response.should be_forbidden
366
+ expect(response).to be_forbidden
367
367
  end
368
368
  end
369
369
  end
@@ -376,14 +376,14 @@ describe ImportRequestsController do
376
376
 
377
377
  it "should be redirected to new session url" do
378
378
  put :update, :id => @import_request.id, :import_request => @attrs
379
- response.should redirect_to(new_user_session_url)
379
+ expect(response).to redirect_to(new_user_session_url)
380
380
  end
381
381
  end
382
382
 
383
383
  describe "with invalid params" do
384
384
  it "assigns the requested import_request as @import_request" do
385
385
  put :update, :id => @import_request.id, :import_request => @invalid_attrs
386
- response.should redirect_to(new_user_session_url)
386
+ expect(response).to redirect_to(new_user_session_url)
387
387
  end
388
388
  end
389
389
  end
@@ -403,7 +403,7 @@ describe ImportRequestsController do
403
403
 
404
404
  it "redirects to the import_requests list" do
405
405
  delete :destroy, :id => @import_request.id
406
- response.should redirect_to(import_requests_url)
406
+ expect(response).to redirect_to(import_requests_url)
407
407
  end
408
408
  end
409
409
 
@@ -416,7 +416,7 @@ describe ImportRequestsController do
416
416
 
417
417
  it "should be forbidden" do
418
418
  delete :destroy, :id => @import_request.id
419
- response.should redirect_to(import_requests_url)
419
+ expect(response).to redirect_to(import_requests_url)
420
420
  end
421
421
  end
422
422
 
@@ -429,7 +429,7 @@ describe ImportRequestsController do
429
429
 
430
430
  it "should be forbidden" do
431
431
  delete :destroy, :id => @import_request.id
432
- response.should be_forbidden
432
+ expect(response).to be_forbidden
433
433
  end
434
434
  end
435
435
 
@@ -440,7 +440,7 @@ describe ImportRequestsController do
440
440
 
441
441
  it "should be forbidden" do
442
442
  delete :destroy, :id => @import_request.id
443
- response.should redirect_to(new_user_session_url)
443
+ expect(response).to redirect_to(new_user_session_url)
444
444
  end
445
445
  end
446
446
  end