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.
- checksums.yaml +4 -4
- data/app/controllers/agent_import_files_controller.rb +1 -1
- data/app/controllers/agent_import_results_controller.rb +30 -6
- data/app/controllers/agent_relationship_types_controller.rb +74 -4
- data/app/controllers/agent_relationships_controller.rb +92 -10
- data/app/controllers/agent_types_controller.rb +74 -3
- data/app/controllers/carrier_types_controller.rb +1 -1
- data/app/controllers/content_types_controller.rb +74 -4
- data/app/controllers/countries_controller.rb +66 -4
- data/app/controllers/create_types_controller.rb +74 -3
- data/app/controllers/extents_controller.rb +74 -4
- data/app/controllers/form_of_works_controller.rb +74 -4
- data/app/controllers/frequencies_controller.rb +74 -4
- data/app/controllers/identifier_types_controller.rb +4 -5
- data/app/controllers/import_requests_controller.rb +1 -1
- data/app/controllers/languages_controller.rb +66 -4
- data/app/controllers/licenses_controller.rb +74 -3
- data/app/controllers/manifestation_relationship_types_controller.rb +74 -3
- data/app/controllers/manifestation_relationships_controller.rb +92 -9
- data/app/controllers/medium_of_performances_controller.rb +74 -3
- data/app/controllers/picture_files_controller.rb +34 -10
- data/app/controllers/produce_types_controller.rb +74 -3
- data/app/controllers/realize_types_controller.rb +74 -3
- data/app/controllers/resource_import_files_controller.rb +2 -1
- data/app/controllers/resource_import_results_controller.rb +31 -11
- data/app/models/agent_import_file.rb +1 -1
- data/app/models/agent_import_result.rb +0 -2
- data/app/models/carrier_type.rb +1 -1
- data/app/models/identifier.rb +5 -0
- data/app/models/item.rb +1 -1
- data/app/models/manifestation.rb +13 -8
- data/app/models/resource_import_file.rb +73 -79
- data/app/views/agent_import_files/index.html.erb +1 -0
- data/app/views/agent_relationship_types/index.html.erb +5 -4
- data/app/views/agent_types/index.html.erb +5 -4
- data/app/views/carrier_types/index.html.erb +2 -1
- data/app/views/content_types/index.html.erb +1 -0
- data/app/views/countries/show.html.erb +5 -0
- data/app/views/create_types/index.html.erb +5 -4
- data/app/views/extents/index.html.erb +2 -1
- data/app/views/form_of_works/index.html.erb +2 -1
- data/app/views/frequencies/index.html.erb +2 -1
- data/app/views/identifier_types/index.html.erb +12 -5
- data/app/views/import_requests/index.html.erb +1 -0
- data/app/views/items/show.html.erb +3 -7
- data/app/views/languages/_form.html.erb +19 -4
- data/app/views/languages/index.html.erb +6 -5
- data/app/views/languages/show.html.erb +19 -4
- data/app/views/layouts/manifestations.html.erb +2 -1
- data/app/views/licenses/index.html.erb +2 -1
- data/app/views/manifestation_relationship_types/index.html.erb +5 -4
- data/app/views/manifestations/_call_number.html.erb +1 -1
- data/app/views/manifestations/_edit_detail.html.erb +4 -1
- data/app/views/manifestations/_form.html.erb +5 -5
- data/app/views/manifestations/_show_detail_librarian.html.erb +8 -3
- data/app/views/manifestations/_show_detail_user.html.erb +8 -3
- data/app/views/medium_of_performances/index.html.erb +2 -1
- data/app/views/notifier/manifestation_info.en.text.erb +1 -1
- data/app/views/notifier/manifestation_info.ja.text.erb +1 -1
- data/app/views/picture_files/_index.html.erb +1 -0
- data/app/views/picture_files/_index_agent.html.erb +1 -0
- data/app/views/picture_files/_index_manifestation.html.erb +1 -0
- data/app/views/picture_files/show.html.erb +15 -7
- data/app/views/produce_types/index.html.erb +5 -4
- data/app/views/realize_types/index.html.erb +5 -4
- data/app/views/resource_import_files/index.html.erb +1 -0
- data/app/views/series_statements/_index.html.erb +1 -0
- data/app/views/series_statements/_index_series_statement_merge_list.html.erb +1 -0
- data/config/locales/translation_en.yml +70 -1
- data/config/locales/translation_ja.yml +77 -8
- data/db/migrate/20140817155043_add_extent_of_text_to_manifestation.rb +5 -0
- data/lib/enju_biblio/biblio_helper.rb +13 -0
- data/lib/enju_biblio/engine.rb +0 -2
- data/lib/enju_biblio/version.rb +1 -1
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/content_types.yml +1 -1
- data/lib/generators/enju_biblio/setup/templates/db/fixtures/identifier_types.yml +24 -3
- data/lib/tasks/enju_biblio_tasks.rake +2 -0
- data/lib/tasks/identifier_type.rb +12 -0
- data/lib/tasks/item.rb +1 -1
- 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
- data/spec/controllers/agent_import_files_controller_spec.rb +35 -35
- data/spec/controllers/agent_import_results_controller_spec.rb +11 -11
- data/spec/controllers/agent_relationship_types_controller_spec.rb +51 -51
- data/spec/controllers/agent_relationships_controller_spec.rb +53 -53
- data/spec/controllers/agent_types_controller_spec.rb +15 -15
- data/spec/controllers/agents_controller_spec.rb +96 -96
- data/spec/controllers/carrier_types_controller_spec.rb +15 -15
- data/spec/controllers/content_types_controller_spec.rb +15 -15
- data/spec/controllers/countries_controller_spec.rb +25 -25
- data/spec/controllers/create_types_controller_spec.rb +15 -15
- data/spec/controllers/creates_controller_spec.rb +50 -50
- data/spec/controllers/donates_controller_spec.rb +49 -49
- data/spec/controllers/extents_controller_spec.rb +15 -15
- data/spec/controllers/form_of_works_controller_spec.rb +15 -15
- data/spec/controllers/frequencies_controller_spec.rb +6 -6
- data/spec/controllers/identifier_types_controller_spec.rb +15 -15
- data/spec/controllers/import_requests_controller_spec.rb +50 -50
- data/spec/controllers/items_controller_spec.rb +72 -72
- data/spec/controllers/languages_controller_spec.rb +18 -18
- data/spec/controllers/licenses_controller_spec.rb +15 -15
- data/spec/controllers/manifestation_relationship_types_controller_spec.rb +51 -51
- data/spec/controllers/manifestation_relationships_controller_spec.rb +53 -53
- data/spec/controllers/manifestations_controller_spec.rb +108 -108
- data/spec/controllers/medium_of_performances_controller_spec.rb +15 -15
- data/spec/controllers/owns_controller_spec.rb +52 -52
- data/spec/controllers/picture_files_controller_spec.rb +52 -52
- data/spec/controllers/produce_types_controller_spec.rb +15 -15
- data/spec/controllers/produces_controller_spec.rb +50 -50
- data/spec/controllers/realize_types_controller_spec.rb +15 -15
- data/spec/controllers/realizes_controller_spec.rb +51 -51
- data/spec/controllers/resource_export_files_controller_spec.rb +38 -38
- data/spec/controllers/resource_import_files_controller_spec.rb +38 -38
- data/spec/controllers/resource_import_results_controller_spec.rb +15 -15
- data/spec/controllers/series_statements_controller_spec.rb +54 -54
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +2 -3
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample1.tsv +19 -19
- data/spec/dummy/private/system/resource_import_files/resource_imports/000/000/004/original/resource_import_file_sample2.tsv +19 -19
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-53863-1jz1wlr.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-55246-1rvhs1s.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60268-1psjqua.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-60996-1cy28m2.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-67507-19qjhj3.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-69234-1cllrec.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140818-76875-1os6joy.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-1148-136brhb.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-473-1c326dm.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-93795-1x882ik.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94274-1xr9d9e.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-94643-1fjcept.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-97947-mfqh5b.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98488-126cvb4.txt +147 -0
- data/spec/dummy/public/system/resource_export_files/resource_exports/000/000/004/original/resource_export_file_20140819-98849-1lg47mm.txt +147 -0
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_5ur +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007580 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007581 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007582 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007583 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007584 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000007585 +0 -0
- data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
- data/spec/dummy/tmp/cache/stdout +2554 -0
- data/spec/dummy/tmp/pids/redis-test.pid +1 -1
- data/spec/fixtures/agent_import_results.yml +0 -3
- data/spec/fixtures/carrier_types.yml +16 -16
- data/spec/fixtures/content_types.yml +78 -29
- data/spec/fixtures/frequencies.yml +32 -62
- data/spec/fixtures/manifestations.yml +1 -1
- data/spec/models/agent_import_result_spec.rb +0 -2
- data/spec/models/manifestation_spec.rb +1 -1
- data/spec/models/resource_import_file_spec.rb +30 -3
- data/spec/views/manifestations/show.html.erb_spec.rb +1 -1
- metadata +68 -103
- data/app/views/picture_files/_index_event.html.erb +0 -53
- data/app/views/picture_files/_index_shelf.html.erb +0 -53
- data/db/migrate/20121116033446_add_doi_to_manifestation.rb +0 -6
- data/spec/dummy/solr/test/data/index/_20i.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20i.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20i.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20i.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20i.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20i.si +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20i_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20j.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20j.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20j.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20j.si +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20j_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fdt +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fdx +0 -0
- data/spec/dummy/solr/test/data/index/_20k.fnm +0 -0
- data/spec/dummy/solr/test/data/index/_20k.nvd +0 -0
- data/spec/dummy/solr/test/data/index/_20k.nvm +0 -0
- data/spec/dummy/solr/test/data/index/_20k.si +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/test/data/index/_20k_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/test/data/index/segments_2uc +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003680 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003681 +0 -0
- data/spec/dummy/solr/test/data/tlog/tlog.0000000000000003682 +0 -0
@@ -9,7 +9,7 @@ describe ResourceImportFilesController do
|
|
9
9
|
|
10
10
|
it "assigns all resource_import_files as @resource_import_files" do
|
11
11
|
get :index
|
12
|
-
assigns(:resource_import_files).
|
12
|
+
expect(assigns(:resource_import_files)).to eq(ResourceImportFile.page(1))
|
13
13
|
end
|
14
14
|
end
|
15
15
|
|
@@ -18,7 +18,7 @@ describe ResourceImportFilesController do
|
|
18
18
|
|
19
19
|
it "assigns all resource_import_files as @resource_import_files" do
|
20
20
|
get :index
|
21
|
-
assigns(:resource_import_files).
|
21
|
+
expect(assigns(:resource_import_files)).to eq(ResourceImportFile.page(1))
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -27,16 +27,16 @@ describe ResourceImportFilesController do
|
|
27
27
|
|
28
28
|
it "assigns empty as @resource_import_files" do
|
29
29
|
get :index
|
30
|
-
assigns(:resource_import_files).
|
31
|
-
response.
|
30
|
+
expect(assigns(:resource_import_files)).to be_empty
|
31
|
+
expect(response).to be_forbidden
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "When not logged in" do
|
36
36
|
it "assigns empty as @resource_import_files" do
|
37
37
|
get :index
|
38
|
-
assigns(:resource_import_files).
|
39
|
-
response.
|
38
|
+
expect(assigns(:resource_import_files)).to be_empty
|
39
|
+
expect(response).to redirect_to(new_user_session_url)
|
40
40
|
end
|
41
41
|
end
|
42
42
|
end
|
@@ -47,8 +47,8 @@ describe ResourceImportFilesController do
|
|
47
47
|
|
48
48
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
49
49
|
get :show, :id => resource_import_files(:resource_import_file_00003).id
|
50
|
-
assigns(:resource_import_file).
|
51
|
-
response.
|
50
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
51
|
+
expect(response).to be_success
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -57,8 +57,8 @@ describe ResourceImportFilesController do
|
|
57
57
|
|
58
58
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
59
59
|
get :show, :id => resource_import_files(:resource_import_file_00003).id
|
60
|
-
assigns(:resource_import_file).
|
61
|
-
response.
|
60
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
61
|
+
expect(response).to be_success
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
@@ -67,16 +67,16 @@ describe ResourceImportFilesController do
|
|
67
67
|
|
68
68
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
69
69
|
get :show, :id => resource_import_files(:resource_import_file_00003).id
|
70
|
-
assigns(:resource_import_file).
|
71
|
-
response.
|
70
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
71
|
+
expect(response).to be_forbidden
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
75
|
describe "When not logged in" do
|
76
76
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
77
77
|
get :show, :id => resource_import_files(:resource_import_file_00003).id
|
78
|
-
assigns(:resource_import_file).
|
79
|
-
response.
|
78
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_files(:resource_import_file_00003))
|
79
|
+
expect(response).to redirect_to(new_user_session_url)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
@@ -87,8 +87,8 @@ describe ResourceImportFilesController do
|
|
87
87
|
|
88
88
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
89
89
|
get :new
|
90
|
-
assigns(:resource_import_file).
|
91
|
-
response.
|
90
|
+
expect(assigns(:resource_import_file)).not_to be_valid
|
91
|
+
expect(response).to be_success
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -97,8 +97,8 @@ describe ResourceImportFilesController do
|
|
97
97
|
|
98
98
|
it "should not assign the requested resource_import_file as @resource_import_file" do
|
99
99
|
get :new
|
100
|
-
assigns(:resource_import_file).
|
101
|
-
response.
|
100
|
+
expect(assigns(:resource_import_file)).not_to be_valid
|
101
|
+
expect(response).to be_success
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
@@ -107,16 +107,16 @@ describe ResourceImportFilesController do
|
|
107
107
|
|
108
108
|
it "should not assign the requested resource_import_file as @resource_import_file" do
|
109
109
|
get :new
|
110
|
-
assigns(:resource_import_file).
|
111
|
-
response.
|
110
|
+
expect(assigns(:resource_import_file)).not_to be_valid
|
111
|
+
expect(response).to be_forbidden
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
115
|
describe "When not logged in" do
|
116
116
|
it "should not assign the requested resource_import_file as @resource_import_file" do
|
117
117
|
get :new
|
118
|
-
assigns(:resource_import_file).
|
119
|
-
response.
|
118
|
+
expect(assigns(:resource_import_file)).not_to be_valid
|
119
|
+
expect(response).to redirect_to(new_user_session_url)
|
120
120
|
end
|
121
121
|
end
|
122
122
|
end
|
@@ -130,9 +130,9 @@ describe ResourceImportFilesController do
|
|
130
130
|
|
131
131
|
it "should create agent_import_file" do
|
132
132
|
post :create, :resource_import_file => {:resource_import => fixture_file_upload("/../../examples/resource_import_file_sample1.tsv", 'text/csv') }
|
133
|
-
assigns(:resource_import_file).
|
133
|
+
expect(assigns(:resource_import_file)).to be_valid
|
134
134
|
assigns(:resource_import_file).user.username.should eq @user.username
|
135
|
-
response.
|
135
|
+
expect(response).to redirect_to resource_import_file_url(assigns(:resource_import_file))
|
136
136
|
end
|
137
137
|
end
|
138
138
|
|
@@ -145,7 +145,7 @@ describe ResourceImportFilesController do
|
|
145
145
|
it "should be forbidden" do
|
146
146
|
post :create, :resource_import_file => {:resource_import => fixture_file_upload("/../../examples/resource_import_file_sample1.tsv", 'text/csv') }
|
147
147
|
assigns(:resource_import_file).user.should be_nil
|
148
|
-
response.
|
148
|
+
expect(response).to be_forbidden
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
@@ -153,7 +153,7 @@ describe ResourceImportFilesController do
|
|
153
153
|
it "should be redirected to new session url" do
|
154
154
|
post :create, :resource_import_file => {:resource_import => fixture_file_upload("/../../examples/resource_import_file_sample1.tsv", 'text/csv') }
|
155
155
|
assigns(:resource_import_file).user.should be_nil
|
156
|
-
response.
|
156
|
+
expect(response).to redirect_to new_user_session_url
|
157
157
|
end
|
158
158
|
end
|
159
159
|
end
|
@@ -165,7 +165,7 @@ describe ResourceImportFilesController do
|
|
165
165
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
166
166
|
resource_import_file = resource_import_files(:resource_import_file_00001)
|
167
167
|
get :edit, :id => resource_import_file.id
|
168
|
-
assigns(:resource_import_file).
|
168
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_file)
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
@@ -175,7 +175,7 @@ describe ResourceImportFilesController do
|
|
175
175
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
176
176
|
resource_import_file = resource_import_files(:resource_import_file_00001)
|
177
177
|
get :edit, :id => resource_import_file.id
|
178
|
-
assigns(:resource_import_file).
|
178
|
+
expect(assigns(:resource_import_file)).to eq(resource_import_file)
|
179
179
|
end
|
180
180
|
end
|
181
181
|
|
@@ -185,7 +185,7 @@ describe ResourceImportFilesController do
|
|
185
185
|
it "assigns the requested resource_import_file as @resource_import_file" do
|
186
186
|
resource_import_file = resource_import_files(:resource_import_file_00001)
|
187
187
|
get :edit, :id => resource_import_file.id
|
188
|
-
response.
|
188
|
+
expect(response).to be_forbidden
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
@@ -193,7 +193,7 @@ describe ResourceImportFilesController do
|
|
193
193
|
it "should not assign the requested resource_import_file as @resource_import_file" do
|
194
194
|
resource_import_file = resource_import_files(:resource_import_file_00001)
|
195
195
|
get :edit, :id => resource_import_file.id
|
196
|
-
response.
|
196
|
+
expect(response).to redirect_to(new_user_session_url)
|
197
197
|
end
|
198
198
|
end
|
199
199
|
end
|
@@ -204,7 +204,7 @@ describe ResourceImportFilesController do
|
|
204
204
|
|
205
205
|
it "should update resource_import_file" do
|
206
206
|
put :update, :id => resource_import_files(:resource_import_file_00003).id, :resource_import_file => { }
|
207
|
-
response.
|
207
|
+
expect(response).to redirect_to resource_import_file_url(assigns(:resource_import_file))
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
@@ -213,7 +213,7 @@ describe ResourceImportFilesController do
|
|
213
213
|
|
214
214
|
it "should update resource_import_file" do
|
215
215
|
put :update, :id => resource_import_files(:resource_import_file_00003).id, :resource_import_file => { }
|
216
|
-
response.
|
216
|
+
expect(response).to redirect_to resource_import_file_url(assigns(:resource_import_file))
|
217
217
|
end
|
218
218
|
end
|
219
219
|
|
@@ -222,14 +222,14 @@ describe ResourceImportFilesController do
|
|
222
222
|
|
223
223
|
it "should not update resource_import_file" do
|
224
224
|
put :update, :id => resource_import_files(:resource_import_file_00003).id, :resource_import_file => { }
|
225
|
-
response.
|
225
|
+
expect(response).to be_forbidden
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
229
229
|
describe "When not logged in" do
|
230
230
|
it "should not update resource_import_file" do
|
231
231
|
put :update, :id => resource_import_files(:resource_import_file_00003).id, :resource_import_file => { }
|
232
|
-
response.
|
232
|
+
expect(response).to redirect_to new_user_session_url
|
233
233
|
end
|
234
234
|
end
|
235
235
|
end
|
@@ -248,7 +248,7 @@ describe ResourceImportFilesController do
|
|
248
248
|
|
249
249
|
it "redirects to the resource_import_files list" do
|
250
250
|
delete :destroy, :id => @resource_import_file.id
|
251
|
-
response.
|
251
|
+
expect(response).to redirect_to(resource_import_files_url)
|
252
252
|
end
|
253
253
|
end
|
254
254
|
|
@@ -261,7 +261,7 @@ describe ResourceImportFilesController do
|
|
261
261
|
|
262
262
|
it "redirects to the resource_import_files list" do
|
263
263
|
delete :destroy, :id => @resource_import_file.id
|
264
|
-
response.
|
264
|
+
expect(response).to redirect_to(resource_import_files_url)
|
265
265
|
end
|
266
266
|
end
|
267
267
|
|
@@ -274,7 +274,7 @@ describe ResourceImportFilesController do
|
|
274
274
|
|
275
275
|
it "should be forbidden" do
|
276
276
|
delete :destroy, :id => @resource_import_file.id
|
277
|
-
response.
|
277
|
+
expect(response).to be_forbidden
|
278
278
|
end
|
279
279
|
end
|
280
280
|
|
@@ -285,7 +285,7 @@ describe ResourceImportFilesController do
|
|
285
285
|
|
286
286
|
it "should be forbidden" do
|
287
287
|
delete :destroy, :id => @resource_import_file.id
|
288
|
-
response.
|
288
|
+
expect(response).to redirect_to(new_user_session_url)
|
289
289
|
end
|
290
290
|
end
|
291
291
|
end
|
@@ -10,7 +10,7 @@ describe ResourceImportResultsController do
|
|
10
10
|
|
11
11
|
it "assigns all resource_import_results as @resource_import_results" do
|
12
12
|
get :index
|
13
|
-
assigns(:resource_import_results).
|
13
|
+
expect(assigns(:resource_import_results)).to eq(ResourceImportResult.page(1))
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ describe ResourceImportResultsController do
|
|
19
19
|
|
20
20
|
it "assigns all resource_import_results as @resource_import_results" do
|
21
21
|
get :index
|
22
|
-
assigns(:resource_import_results).
|
22
|
+
expect(assigns(:resource_import_results)).to eq(ResourceImportResult.page(1))
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -28,16 +28,16 @@ describe ResourceImportResultsController do
|
|
28
28
|
|
29
29
|
it "assigns empty as @resource_import_results" do
|
30
30
|
get :index
|
31
|
-
assigns(:resource_import_results).
|
32
|
-
response.
|
31
|
+
expect(assigns(:resource_import_results)).to be_empty
|
32
|
+
expect(response).to be_forbidden
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
36
|
describe "When not logged in" do
|
37
37
|
it "assigns empty as @resource_import_results" do
|
38
38
|
get :index
|
39
|
-
assigns(:resource_import_results).
|
40
|
-
response.
|
39
|
+
expect(assigns(:resource_import_results)).to be_empty
|
40
|
+
expect(response).to redirect_to(new_user_session_url)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -48,7 +48,7 @@ describe ResourceImportResultsController do
|
|
48
48
|
|
49
49
|
it "assigns the requested resource_import_result as @resource_import_result" do
|
50
50
|
get :show, :id => 1
|
51
|
-
assigns(:resource_import_result).
|
51
|
+
expect(assigns(:resource_import_result)).to eq(ResourceImportResult.find(1))
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
@@ -57,7 +57,7 @@ describe ResourceImportResultsController do
|
|
57
57
|
|
58
58
|
it "assigns the requested resource_import_result as @resource_import_result" do
|
59
59
|
get :show, :id => 1
|
60
|
-
assigns(:resource_import_result).
|
60
|
+
expect(assigns(:resource_import_result)).to eq(ResourceImportResult.find(1))
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
@@ -66,15 +66,15 @@ describe ResourceImportResultsController do
|
|
66
66
|
|
67
67
|
it "assigns the requested resource_import_result as @resource_import_result" do
|
68
68
|
get :show, :id => 1
|
69
|
-
assigns(:resource_import_result).
|
69
|
+
expect(assigns(:resource_import_result)).to eq(ResourceImportResult.find(1))
|
70
70
|
end
|
71
71
|
end
|
72
72
|
|
73
73
|
describe "When not logged in" do
|
74
74
|
it "assigns the requested resource_import_result as @resource_import_result" do
|
75
75
|
get :show, :id => 1
|
76
|
-
assigns(:resource_import_result).
|
77
|
-
response.
|
76
|
+
expect(assigns(:resource_import_result)).to eq(ResourceImportResult.find(1))
|
77
|
+
expect(response).to redirect_to(new_user_session_url)
|
78
78
|
end
|
79
79
|
end
|
80
80
|
end
|
@@ -93,7 +93,7 @@ describe ResourceImportResultsController do
|
|
93
93
|
|
94
94
|
it "should be forbidden" do
|
95
95
|
delete :destroy, :id => @resource_import_result.id
|
96
|
-
response.
|
96
|
+
expect(response).to be_forbidden
|
97
97
|
end
|
98
98
|
end
|
99
99
|
|
@@ -106,7 +106,7 @@ describe ResourceImportResultsController do
|
|
106
106
|
|
107
107
|
it "should be forbidden" do
|
108
108
|
delete :destroy, :id => @resource_import_result.id
|
109
|
-
response.
|
109
|
+
expect(response).to be_forbidden
|
110
110
|
end
|
111
111
|
end
|
112
112
|
|
@@ -119,7 +119,7 @@ describe ResourceImportResultsController do
|
|
119
119
|
|
120
120
|
it "should be forbidden" do
|
121
121
|
delete :destroy, :id => @resource_import_result.id
|
122
|
-
response.
|
122
|
+
expect(response).to be_forbidden
|
123
123
|
end
|
124
124
|
end
|
125
125
|
|
@@ -130,7 +130,7 @@ describe ResourceImportResultsController do
|
|
130
130
|
|
131
131
|
it "should be forbidden" do
|
132
132
|
delete :destroy, :id => @resource_import_result.id
|
133
|
-
response.
|
133
|
+
expect(response).to redirect_to(new_user_session_url)
|
134
134
|
end
|
135
135
|
end
|
136
136
|
end
|