enju_flower 0.1.0.pre20 → 0.1.0.pre21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +3 -0
- data/app/views/manifestations/_index_form_series_statement.html.erb +1 -1
- data/app/views/manifestations/_manifestation.html.erb +4 -1
- data/app/views/manifestations/_show_detail_librarian.html.erb +3 -1
- data/app/views/manifestations/_show_holding.html.erb +5 -0
- data/app/views/manifestations/index.html.erb +7 -2
- data/app/views/manifestations/index.mobile.erb +1 -1
- data/app/views/manifestations/index.rdf.builder +1 -1
- data/app/views/manifestations/index.rss.builder +3 -3
- data/app/views/manifestations/index.sru.builder +1 -1
- data/app/views/manifestations/show.html.erb +1 -1
- data/app/views/manifestations/show.mobile.erb +1 -1
- data/app/views/manifestations/show.mods.builder +1 -1
- data/app/views/manifestations/show.rdf.builder +1 -1
- data/lib/enju_flower/version.rb +1 -1
- data/spec/controllers/manifestations_controller_spec.rb +115 -116
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/database.yml +23 -18
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
- data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
- data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
- data/spec/dummy/db/schema.rb +5 -1
- data/spec/factories/agent.rb +1 -1
- data/spec/factories/create_types.rb +1 -1
- data/spec/factories/item.rb +8 -0
- data/spec/factories/produce_types.rb +1 -1
- data/spec/factories/realize_types.rb +1 -1
- data/spec/factories/series_statement.rb +5 -0
- data/spec/fixtures/agent_relationship_types.yml +5 -6
- data/spec/fixtures/agent_types.yml +5 -6
- data/spec/fixtures/agents.yml +0 -1
- data/spec/fixtures/carrier_types.yml +18 -19
- data/spec/fixtures/checkout_types.yml +34 -0
- data/spec/fixtures/circulation_statuses.yml +136 -0
- data/spec/fixtures/content_types.yml +80 -18
- data/spec/fixtures/frequencies.yml +34 -51
- data/spec/fixtures/identifier_types.yml +9 -3
- data/spec/fixtures/identifiers.yml +9 -3
- data/spec/fixtures/manifestations.yml +129 -119
- data/spec/fixtures/medium_of_performances.yml +4 -5
- data/spec/fixtures/profiles.yml +1 -1
- data/spec/fixtures/use_restrictions.yml +93 -0
- data/spec/fixtures/user_groups.yml +2 -2
- data/spec/fixtures/users.yml +4 -1
- data/spec/spec_helper.rb +4 -0
- data/spec/views/manifestations/index.html.erb_spec.rb +59 -0
- metadata +72 -158
- data/app/helpers/manifestations_helper.rb +0 -176
- data/app/views/manifestations/_submenu_parent.html.erb +0 -8
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/dummy/solr/conf/admin-extra.html +0 -31
- data/spec/dummy/solr/conf/elevate.xml +0 -36
- data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
- data/spec/dummy/solr/conf/protwords.txt +0 -21
- data/spec/dummy/solr/conf/schema.xml +0 -255
- data/spec/dummy/solr/conf/scripts.conf +0 -24
- data/spec/dummy/solr/conf/solrconfig.xml +0 -667
- data/spec/dummy/solr/conf/spellings.txt +0 -2
- data/spec/dummy/solr/conf/stopwords.txt +0 -58
- data/spec/dummy/solr/conf/synonyms.txt +0 -31
- data/spec/dummy/solr/default/data/index/_d2.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_d2.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_d2.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_d2.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_d2.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_d2.si +0 -0
- data/spec/dummy/solr/default/data/index/_d2_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_d2_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_d2_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_d2_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_d3.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_d3.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_d3.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_d3.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_d3.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_d3.si +0 -0
- data/spec/dummy/solr/default/data/index/_d3_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_d3_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_d3_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_d3_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/_d4.fdt +0 -0
- data/spec/dummy/solr/default/data/index/_d4.fdx +0 -0
- data/spec/dummy/solr/default/data/index/_d4.fnm +0 -0
- data/spec/dummy/solr/default/data/index/_d4.nvd +0 -0
- data/spec/dummy/solr/default/data/index/_d4.nvm +0 -0
- data/spec/dummy/solr/default/data/index/_d4.si +0 -0
- data/spec/dummy/solr/default/data/index/_d4_Lucene41_0.doc +0 -0
- data/spec/dummy/solr/default/data/index/_d4_Lucene41_0.pos +0 -0
- data/spec/dummy/solr/default/data/index/_d4_Lucene41_0.tim +0 -0
- data/spec/dummy/solr/default/data/index/_d4_Lucene41_0.tip +0 -0
- data/spec/dummy/solr/default/data/index/segments.gen +0 -0
- data/spec/dummy/solr/default/data/index/segments_hk +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000628 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000629 +0 -0
- data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000630 +0 -0
- data/spec/dummy/solr/development/data/index/segments.gen +0 -0
- data/spec/dummy/solr/development/data/index/segments_1 +0 -0
- data/spec/dummy/solr/solr.xml +0 -8
- data/spec/dummy/solr/test/data/index/segments.gen +0 -0
- data/spec/dummy/solr/test/data/index/segments_1 +0 -0
- data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
- data/spec/dummy/tmp/cache/6E4/420/search_engine_all +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/006a5adcd278a9c5c9df80a7a2b414e6 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/00a6cf2442f0e06a50f5c5f44d7aff65 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/11f06eac4db4fb45d3bb109e7f97c1c9 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/1f84f73be56154eba5c29f8ef2ac2177 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/5867d1b0ac4e0597324985236c19a68f +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/59e554f7bfa724cc56b5d8cb56ef333a +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/67565528560062a46655ddd9d226e508 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/6e466646ae89de53fd9397ce2555ca91 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/75a69bb28a2f0aac5401bd0e5f65effc +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/bd6a0f9e031203673fda12a83251f03b +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/d49e28dc6b072432f42b121b05195488 +0 -0
- data/spec/dummy/tmp/cache/assets/test/sprockets/ebc83b1f2325c61a70d933aa7a17df5a +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6a29725c815c423e7e63834ee36608293da680f7
|
4
|
+
data.tar.gz: 5cd2c0d902c8e496e28224293fe74ca67efc3086
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51d303040a75ed74611b6c10c72df22384181bb493d33a4023fed603809db54d680d634edc42e3547d3c1235744d54cce8107f5743aa3b48468cb6ec4b2fdf6e
|
7
|
+
data.tar.gz: fa1bc26884469517300e527e955060e570d2647efe6e0f1af25167e5b9a7de83112865ad72e83ae919f926b8b26bbcfaf0f37702e79819e80e015ebd967a481e
|
data/README.rdoc
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
= Next-L Enju Flower
|
2
|
+
{<img src="https://travis-ci.org/next-l/enju_flower.png?branch=1.1" alt="Build Status" />}[https://travis-ci.org/next-l/enju_flower]
|
3
|
+
{<img src="https://coveralls.io/repos/next-l/enju_flower/badge.png?branch=1.1" alt="Coverage Status" />}[https://coveralls.io/r/next-l/enju_flower?branch=1.1]
|
4
|
+
{<img src="https://hakiri.io/github/next-l/enju_flower/1.1.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_flower/1.1]
|
2
5
|
|
3
6
|
== Related projects
|
4
7
|
* {Next-L Enju Root}[https://github.com/next-l/enju_root]
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<%= label_tag :search_form_top, t('page.search_term') -%>:
|
10
10
|
<%= search_field_tag 'query', h(@query), {id: 'search_form_top', class: 'search_form', placeholder: t('page.search_term')} -%>
|
11
11
|
<%= hidden_field_tag 'reservable', h(@reservable) if @reservable -%>
|
12
|
-
<% if can? :
|
12
|
+
<% if can? :create, Manifestation %>
|
13
13
|
<%= render 'page/add' %>
|
14
14
|
<% end %>
|
15
15
|
<%= submit_tag t('page.search') -%>
|
@@ -44,7 +44,10 @@
|
|
44
44
|
<% end %>
|
45
45
|
<%- if can? :update, manifestation -%>
|
46
46
|
<% unless params[:mode] == 'add' %>
|
47
|
-
|
47
|
+
<% if manifestation.serial? && manifestation.series_master? %>
|
48
|
+
<%= link_to t('page.new_acquisition'), new_manifestation_path(parent_id: manifestation.id) %>
|
49
|
+
<% end %>
|
50
|
+
<%= link_to t('page.edit'), edit_manifestation_path(manifestation) -%>
|
48
51
|
<% else %>
|
49
52
|
<% case %>
|
50
53
|
<% when @parent %>
|
@@ -106,7 +106,9 @@
|
|
106
106
|
</tr>
|
107
107
|
</table>
|
108
108
|
<% end %>
|
109
|
-
|
109
|
+
<%- if manifestation.items.on_shelf.exists? -%>
|
110
|
+
<%= render 'manifestations/show_holding', manifestation: manifestation -%>
|
111
|
+
<%- end -%>
|
110
112
|
</div>
|
111
113
|
<%= render 'manifestations/tab_list', manifestation: manifestation %>
|
112
114
|
</div>
|
@@ -37,7 +37,12 @@
|
|
37
37
|
<% if defined?(EnjuCirculation) %>
|
38
38
|
<td>
|
39
39
|
<%= item.circulation_status.display_name.localize if item.circulation_status -%>
|
40
|
+
<% if item.retained? %>
|
41
|
+
<br />
|
42
|
+
<%= t('reserve.retained') %>
|
43
|
+
<% end %>
|
40
44
|
<% if item.rent? %>
|
45
|
+
<br />
|
41
46
|
(
|
42
47
|
<%= t('activerecord.attributes.checkout.due_date') -%>:
|
43
48
|
<%= l(item.latest_checkout.due_date, format: :short) -%>
|
@@ -55,9 +55,13 @@
|
|
55
55
|
</p>
|
56
56
|
|
57
57
|
<div class="autopagerize_page_element" id="list">
|
58
|
-
|
59
|
-
|
58
|
+
<table class="table table-striped index" id="manifestation_list">
|
59
|
+
<%= render @manifestations %>
|
60
|
+
</table>
|
60
61
|
|
62
|
+
<%= paginate(@manifestations) -%>
|
63
|
+
<br />
|
64
|
+
</div>
|
61
65
|
<% if defined?(EnjuBookmark) %>
|
62
66
|
<div id="tag_cloud">
|
63
67
|
<h3 class="resource_title"><%= t('activerecord.models.tag') -%></h3>
|
@@ -67,6 +71,7 @@
|
|
67
71
|
</div>
|
68
72
|
<% end %>
|
69
73
|
<%- else -%>
|
74
|
+
<!-- TODO: 検索結果が少ない場合にも表示させる -->
|
70
75
|
<%= render 'manifestations/not_found' -%>
|
71
76
|
<%- end -%>
|
72
77
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
xml.instruct! :xml, :
|
1
|
+
xml.instruct! :xml, version: "1.0"
|
2
2
|
xml.rss('version' => "2.0",
|
3
3
|
'xmlns:opensearch' => "http://a9.com/-/spec/opensearch/1.1/",
|
4
4
|
'xmlns:dc' => "http://purl.org/dc/elements/1.1/",
|
@@ -16,7 +16,7 @@ xml.rss('version' => "2.0",
|
|
16
16
|
xml.tag! "opensearch:totalResults", @manifestations.total_count
|
17
17
|
xml.tag! "opensearch:startIndex", @manifestations.offset_value + 1
|
18
18
|
xml.tag! "opensearch:itemsPerPage", @manifestations.limit_value
|
19
|
-
xml.tag! "opensearch:Query", role: 'request', :
|
19
|
+
xml.tag! "opensearch:Query", role: 'request', searchTerms: h(params[:query]), startPage: (h(params[:page]) || 1)
|
20
20
|
end
|
21
21
|
if @manifestations
|
22
22
|
@manifestations.each do |manifestation|
|
@@ -29,7 +29,7 @@ xml.rss('version' => "2.0",
|
|
29
29
|
end
|
30
30
|
xml.pubDate manifestation.date_of_publication.try(:utc).try(:rfc822)
|
31
31
|
xml.link manifestation_url(manifestation)
|
32
|
-
xml.guid manifestation_url(manifestation), :
|
32
|
+
xml.guid manifestation_url(manifestation), isPermaLink: "true"
|
33
33
|
manifestation.identifier_contents(:isbn).each do |i|
|
34
34
|
xml.tag! "dc:identifier", i
|
35
35
|
end
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<% if @manifestation.is_reservable_by?(current_user) %>
|
60
60
|
<li><%= link_to_reservation(@manifestation, @reserve) %>
|
61
61
|
<br />
|
62
|
-
(<%= t('page.number_of_reservations', count: @reserved_count) -%>)</li>
|
62
|
+
(<%= link_to_if(current_user.has_role?('Librarian'), t('page.number_of_reservations', count: @reserved_count), reserves_path(query: "manifestation_id_i:#{@manifestation.id}")) -%>)</li>
|
63
63
|
<%- else -%>
|
64
64
|
<% if defined?(EnjuPurchaseRequest) %>
|
65
65
|
<li><%= link_to t('activerecord.models.purchase_request'), new_purchase_request_path(purchase_request: {url: manifestation_url(@manifestation)}) %></li>
|
@@ -14,7 +14,7 @@
|
|
14
14
|
<td><%= @manifestation.price %></td>
|
15
15
|
</tr>
|
16
16
|
</table>
|
17
|
-
<%- if @manifestation.items.on_shelf.exists? -%>
|
17
|
+
<%- if @manifestation.items.for_checkout.on_shelf.exists? -%>
|
18
18
|
<%= render 'manifestations/show_holding', manifestation: @manifestation -%>
|
19
19
|
<%- end -%>
|
20
20
|
</div>
|
data/lib/enju_flower/version.rb
CHANGED
@@ -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).
|
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).
|
29
|
+
expect(assigns(:manifestations)).to_not be_nil
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
@@ -35,137 +35,131 @@ describe ManifestationsController do
|
|
35
35
|
|
36
36
|
it "assigns all manifestations as @manifestations" do
|
37
37
|
get :index
|
38
|
-
assigns(:manifestations).
|
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).
|
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.
|
51
|
-
assigns(:manifestations).
|
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.
|
57
|
-
assigns(:manifestations).
|
58
|
-
response.
|
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).
|
65
|
-
response.
|
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).
|
71
|
-
response.
|
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).
|
77
|
-
response.
|
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).
|
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).
|
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).
|
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).
|
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).
|
105
|
-
response.
|
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).
|
111
|
-
response.
|
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.
|
117
|
-
assigns(:manifestation).
|
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
|
-
it "should get index with publisher_id" do
|
122
|
-
get :index, :publisher_id => 1
|
123
|
-
response.should be_success
|
124
|
-
assigns(:manifestations).collect(&:id).should eq Agent.find(1).manifestations.order('created_at DESC').collect(&:id)
|
125
|
-
end
|
126
|
-
|
127
121
|
it "should get index with query" do
|
128
122
|
get :index, :query => '2005'
|
129
|
-
response.
|
130
|
-
assigns(:manifestations).
|
123
|
+
expect(response).to be_success
|
124
|
+
expect(assigns(:manifestations)).to_not be_blank
|
131
125
|
end
|
132
126
|
|
133
127
|
it "should get index with page number" do
|
134
128
|
get :index, :query => '2005', :number_of_pages_at_least => 1, :number_of_pages_at_most => 100
|
135
|
-
response.
|
129
|
+
expect(response).to be_success
|
136
130
|
assigns(:query).should eq '2005 number_of_pages_i:[1 TO 100]'
|
137
131
|
end
|
138
132
|
|
139
133
|
it "should get index with pub_date_from" do
|
140
134
|
get :index, :query => '2005', :pub_date_from => '2000'
|
141
|
-
response.
|
142
|
-
assigns(:manifestations).
|
135
|
+
expect(response).to be_success
|
136
|
+
expect(assigns(:manifestations)).to be_truthy
|
143
137
|
assigns(:query).should eq '2005 date_of_publication_d:[1999-12-31T15:00:00Z TO *]'
|
144
138
|
end
|
145
139
|
|
146
140
|
it "should get index with pub_date_to" do
|
147
141
|
get :index, :query => '2005', :pub_date_to => '2000'
|
148
|
-
response.
|
149
|
-
assigns(:manifestations).
|
142
|
+
expect(response).to be_success
|
143
|
+
expect(assigns(:manifestations)).to be_truthy
|
150
144
|
assigns(:query).should eq '2005 date_of_publication_d:[* TO 2000-12-31T14:59:59Z]'
|
151
145
|
end
|
152
146
|
|
153
147
|
it "should get tag_cloud" do
|
154
148
|
get :index, :query => '2005', :view => 'tag_cloud'
|
155
|
-
response.
|
156
|
-
response.
|
149
|
+
expect(response).to be_success
|
150
|
+
expect(response).to render_template("manifestations/_tag_cloud")
|
157
151
|
end
|
158
152
|
|
159
153
|
it "should show manifestation with isbn", :solr => true do
|
160
154
|
get :index, :isbn => "4798002062"
|
161
|
-
response.
|
162
|
-
assigns(:manifestations).count.
|
155
|
+
expect(response).to be_success
|
156
|
+
expect(assigns(:manifestations).count).to eq 1
|
163
157
|
end
|
164
158
|
|
165
159
|
it "should not show missing manifestation with isbn", :solr => true do
|
166
160
|
get :index, :isbn => "47980020620"
|
167
|
-
response.
|
168
|
-
assigns(:manifestations).
|
161
|
+
expect(response).to be_success
|
162
|
+
expect(assigns(:manifestations)).to be_empty
|
169
163
|
end
|
170
164
|
end
|
171
165
|
end
|
@@ -176,7 +170,7 @@ describe ManifestationsController do
|
|
176
170
|
|
177
171
|
it "assigns the requested manifestation as @manifestation" do
|
178
172
|
get :show, :id => 1
|
179
|
-
assigns(:manifestation).
|
173
|
+
expect(assigns(:manifestation)).to eq(Manifestation.find(1))
|
180
174
|
end
|
181
175
|
end
|
182
176
|
|
@@ -185,13 +179,13 @@ describe ManifestationsController do
|
|
185
179
|
|
186
180
|
it "assigns the requested manifestation as @manifestation" do
|
187
181
|
get :show, :id => 1
|
188
|
-
assigns(:manifestation).
|
182
|
+
expect(assigns(:manifestation)).to eq(Manifestation.find(1))
|
189
183
|
end
|
190
184
|
|
191
185
|
it "should show manifestation with agent who does not produce it" do
|
192
186
|
get :show, :id => 3, :agent_id => 3
|
193
|
-
assigns(:manifestation).
|
194
|
-
response.
|
187
|
+
expect(assigns(:manifestation)).to eq assigns(:agent).manifestations.find(3)
|
188
|
+
expect(response).to be_success
|
195
189
|
end
|
196
190
|
end
|
197
191
|
|
@@ -200,70 +194,70 @@ describe ManifestationsController do
|
|
200
194
|
|
201
195
|
it "assigns the requested manifestation as @manifestation" do
|
202
196
|
get :show, :id => 1
|
203
|
-
assigns(:manifestation).
|
197
|
+
expect(assigns(:manifestation)).to eq(Manifestation.find(1))
|
204
198
|
end
|
205
199
|
|
206
200
|
it "should send manifestation detail email" do
|
207
201
|
get :show, :id => 1, :mode => 'send_email'
|
208
|
-
response.
|
202
|
+
expect(response).to redirect_to manifestation_url(assigns(:manifestation))
|
209
203
|
end
|
210
204
|
|
211
205
|
#it "should show myself" do
|
212
206
|
# get :show, :id => users(:user1).agent
|
213
|
-
# response.
|
207
|
+
# expect(response).to be_success
|
214
208
|
#end
|
215
209
|
end
|
216
210
|
|
217
211
|
describe "When not logged in" do
|
218
212
|
it "assigns the requested manifestation as @manifestation" do
|
219
213
|
get :show, :id => 1
|
220
|
-
assigns(:manifestation).
|
214
|
+
expect(assigns(:manifestation)).to eq(Manifestation.find(1))
|
221
215
|
end
|
222
216
|
|
223
217
|
it "guest should show manifestation mods template" do
|
224
218
|
get :show, :id => 22, :format => 'mods'
|
225
|
-
assigns(:manifestation).
|
226
|
-
response.
|
219
|
+
expect(assigns(:manifestation)).to eq Manifestation.find(22)
|
220
|
+
expect(response).to render_template("manifestations/show")
|
227
221
|
end
|
228
222
|
|
229
223
|
it "should show manifestation rdf template" do
|
230
224
|
get :show, :id => 22, :format => 'rdf'
|
231
|
-
assigns(:manifestation).
|
232
|
-
response.
|
225
|
+
expect(assigns(:manifestation)).to eq Manifestation.find(22)
|
226
|
+
expect(response).to render_template("manifestations/show")
|
233
227
|
end
|
234
228
|
|
235
229
|
it "should show manifestation with holding" do
|
236
230
|
get :show, :id => 1, :mode => 'holding'
|
237
|
-
response.
|
231
|
+
expect(response).to be_success
|
238
232
|
end
|
239
233
|
|
240
234
|
it "should show manifestation with tag_edit" do
|
241
235
|
get :show, :id => 1, :mode => 'tag_edit'
|
242
|
-
response.
|
243
|
-
response.
|
236
|
+
expect(response).to render_template('manifestations/_tag_edit')
|
237
|
+
expect(response).to be_success
|
244
238
|
end
|
245
239
|
|
246
240
|
it "should show manifestation with tag_list" do
|
247
241
|
get :show, :id => 1, :mode => 'tag_list'
|
248
|
-
response.
|
249
|
-
response.
|
242
|
+
expect(response).to render_template('manifestations/_tag_list')
|
243
|
+
expect(response).to be_success
|
250
244
|
end
|
251
245
|
|
252
246
|
it "should show manifestation with show_creators" do
|
253
247
|
get :show, :id => 1, :mode => 'show_creators'
|
254
|
-
response.
|
255
|
-
response.
|
248
|
+
expect(response).to render_template('manifestations/_show_creators')
|
249
|
+
expect(response).to be_success
|
256
250
|
end
|
257
251
|
|
258
252
|
it "should show manifestation with show_all_creators" do
|
259
253
|
get :show, :id => 1, :mode => 'show_all_creators'
|
260
|
-
response.
|
261
|
-
response.
|
254
|
+
expect(response).to render_template('manifestations/_show_creators')
|
255
|
+
expect(response).to be_success
|
262
256
|
end
|
263
257
|
|
264
258
|
it "should not send manifestation's detail email" do
|
265
259
|
get :show, :id => 1, :mode => 'send_email'
|
266
|
-
response.
|
260
|
+
expect(response).to redirect_to new_user_session_url
|
267
261
|
end
|
268
262
|
end
|
269
263
|
end
|
@@ -274,17 +268,17 @@ describe ManifestationsController do
|
|
274
268
|
|
275
269
|
it "assigns the requested manifestation as @manifestation" do
|
276
270
|
get :new
|
277
|
-
assigns(:manifestation).
|
271
|
+
expect(assigns(:manifestation)).to_not be_valid
|
278
272
|
end
|
279
273
|
|
280
274
|
it "should get new template without expression_id" do
|
281
275
|
get :new
|
282
|
-
response.
|
276
|
+
expect(response).to be_success
|
283
277
|
end
|
284
278
|
|
285
279
|
it "should get new template with expression_id" do
|
286
280
|
get :new, :expression_id => 1
|
287
|
-
response.
|
281
|
+
expect(response).to be_success
|
288
282
|
end
|
289
283
|
end
|
290
284
|
|
@@ -293,17 +287,17 @@ describe ManifestationsController do
|
|
293
287
|
|
294
288
|
it "assigns the requested manifestation as @manifestation" do
|
295
289
|
get :new
|
296
|
-
assigns(:manifestation).
|
290
|
+
expect(assigns(:manifestation)).to_not be_valid
|
297
291
|
end
|
298
292
|
|
299
293
|
it "should get new template without expression_id" do
|
300
294
|
get :new
|
301
|
-
response.
|
295
|
+
expect(response).to be_success
|
302
296
|
end
|
303
297
|
|
304
298
|
it "should get new template with expression_id" do
|
305
299
|
get :new, :expression_id => 1
|
306
|
-
response.
|
300
|
+
expect(response).to be_success
|
307
301
|
end
|
308
302
|
end
|
309
303
|
|
@@ -312,16 +306,16 @@ describe ManifestationsController do
|
|
312
306
|
|
313
307
|
it "should not assign the requested manifestation as @manifestation" do
|
314
308
|
get :new
|
315
|
-
assigns(:manifestation).
|
316
|
-
response.
|
309
|
+
expect(assigns(:manifestation)).to_not be_valid
|
310
|
+
expect(response).to be_forbidden
|
317
311
|
end
|
318
312
|
end
|
319
313
|
|
320
314
|
describe "When not logged in" do
|
321
315
|
it "should not assign the requested manifestation as @manifestation" do
|
322
316
|
get :new
|
323
|
-
assigns(:manifestation).
|
324
|
-
response.
|
317
|
+
expect(assigns(:manifestation)).to_not be_valid
|
318
|
+
expect(response).to redirect_to(new_user_session_url)
|
325
319
|
end
|
326
320
|
end
|
327
321
|
end
|
@@ -333,7 +327,7 @@ describe ManifestationsController do
|
|
333
327
|
it "assigns the requested manifestation as @manifestation" do
|
334
328
|
manifestation = FactoryGirl.create(:manifestation)
|
335
329
|
get :edit, :id => manifestation.id
|
336
|
-
assigns(:manifestation).
|
330
|
+
expect(assigns(:manifestation)).to eq(manifestation)
|
337
331
|
end
|
338
332
|
end
|
339
333
|
|
@@ -343,7 +337,7 @@ describe ManifestationsController do
|
|
343
337
|
it "assigns the requested manifestation as @manifestation" do
|
344
338
|
manifestation = FactoryGirl.create(:manifestation)
|
345
339
|
get :edit, :id => manifestation.id
|
346
|
-
assigns(:manifestation).
|
340
|
+
expect(assigns(:manifestation)).to eq(manifestation)
|
347
341
|
end
|
348
342
|
end
|
349
343
|
|
@@ -353,12 +347,12 @@ describe ManifestationsController do
|
|
353
347
|
it "assigns the requested manifestation as @manifestation" do
|
354
348
|
manifestation = FactoryGirl.create(:manifestation)
|
355
349
|
get :edit, :id => manifestation.id
|
356
|
-
response.
|
350
|
+
expect(response).to be_forbidden
|
357
351
|
end
|
358
352
|
|
359
353
|
it "should edit manifestation with tag_edit" do
|
360
354
|
get :edit, :id => 1, :mode => 'tag_edit'
|
361
|
-
response.
|
355
|
+
expect(response).to be_success
|
362
356
|
end
|
363
357
|
end
|
364
358
|
|
@@ -366,7 +360,7 @@ describe ManifestationsController do
|
|
366
360
|
it "should not assign the requested manifestation as @manifestation" do
|
367
361
|
manifestation = FactoryGirl.create(:manifestation)
|
368
362
|
get :edit, :id => manifestation.id
|
369
|
-
response.
|
363
|
+
expect(response).to redirect_to(new_user_session_url)
|
370
364
|
end
|
371
365
|
end
|
372
366
|
end
|
@@ -383,30 +377,30 @@ describe ManifestationsController do
|
|
383
377
|
describe "with valid params" do
|
384
378
|
it "assigns a newly created manifestation as @manifestation" do
|
385
379
|
post :create, :manifestation => @attrs
|
386
|
-
assigns(:manifestation).
|
380
|
+
expect(assigns(:manifestation)).to be_valid
|
387
381
|
end
|
388
382
|
|
389
383
|
it "assigns a series_statement" do
|
390
|
-
post :create, :manifestation => @attrs.merge(:series_statements_attributes => {
|
384
|
+
post :create, :manifestation => @attrs.merge(:series_statements_attributes => {"0" => {:original_title => SeriesStatement.find(1).original_title}})
|
391
385
|
assigns(:manifestation).reload
|
392
386
|
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:one).original_title).should be_truthy
|
393
387
|
end
|
394
388
|
|
395
389
|
it "redirects to the created manifestation" do
|
396
390
|
post :create, :manifestation => @attrs
|
397
|
-
response.
|
391
|
+
expect(response).to redirect_to(manifestation_url(assigns(:manifestation)))
|
398
392
|
end
|
399
393
|
end
|
400
394
|
|
401
395
|
describe "with invalid params" do
|
402
396
|
it "assigns a newly created but unsaved manifestation as @manifestation" do
|
403
397
|
post :create, :manifestation => @invalid_attrs
|
404
|
-
assigns(:manifestation).
|
398
|
+
expect(assigns(:manifestation)).to_not be_valid
|
405
399
|
end
|
406
400
|
|
407
401
|
it "re-renders the 'new' template" do
|
408
402
|
post :create, :manifestation => @invalid_attrs
|
409
|
-
response.
|
403
|
+
expect(response).to render_template("new")
|
410
404
|
end
|
411
405
|
end
|
412
406
|
end
|
@@ -417,24 +411,29 @@ describe ManifestationsController do
|
|
417
411
|
describe "with valid params" do
|
418
412
|
it "assigns a newly created manifestation as @manifestation" do
|
419
413
|
post :create, :manifestation => @attrs
|
420
|
-
assigns(:manifestation).
|
414
|
+
expect(assigns(:manifestation)).to be_valid
|
421
415
|
end
|
422
416
|
|
423
417
|
it "redirects to the created manifestation" do
|
424
418
|
post :create, :manifestation => @attrs
|
425
|
-
response.
|
419
|
+
expect(response).to redirect_to(manifestation_url(assigns(:manifestation)))
|
426
420
|
end
|
421
|
+
|
422
|
+
#it "accepts an attachment file" do
|
423
|
+
# post :create, :manifestation => @attrs.merge(attachment: fixture_file_upload("/../../examples/resource_import_file_sample1.tsv", 'text/csv'))
|
424
|
+
# expect(assigns(:manifestation)).to be_valid
|
425
|
+
#end
|
427
426
|
end
|
428
427
|
|
429
428
|
describe "with invalid params" do
|
430
429
|
it "assigns a newly created but unsaved manifestation as @manifestation" do
|
431
430
|
post :create, :manifestation => @invalid_attrs
|
432
|
-
assigns(:manifestation).
|
431
|
+
expect(assigns(:manifestation)).to_not be_valid
|
433
432
|
end
|
434
433
|
|
435
434
|
it "re-renders the 'new' template" do
|
436
435
|
post :create, :manifestation => @invalid_attrs
|
437
|
-
response.
|
436
|
+
expect(response).to render_template("new")
|
438
437
|
end
|
439
438
|
end
|
440
439
|
end
|
@@ -445,24 +444,24 @@ describe ManifestationsController do
|
|
445
444
|
describe "with valid params" do
|
446
445
|
it "assigns a newly created manifestation as @manifestation" do
|
447
446
|
post :create, :manifestation => @attrs
|
448
|
-
assigns(:manifestation).
|
447
|
+
expect(assigns(:manifestation)).to be_valid
|
449
448
|
end
|
450
449
|
|
451
450
|
it "should be forbidden" do
|
452
451
|
post :create, :manifestation => @attrs
|
453
|
-
response.
|
452
|
+
expect(response).to be_forbidden
|
454
453
|
end
|
455
454
|
end
|
456
455
|
|
457
456
|
describe "with invalid params" do
|
458
457
|
it "assigns a newly created but unsaved manifestation as @manifestation" do
|
459
458
|
post :create, :manifestation => @invalid_attrs
|
460
|
-
assigns(:manifestation).
|
459
|
+
expect(assigns(:manifestation)).to_not be_valid
|
461
460
|
end
|
462
461
|
|
463
462
|
it "should be forbidden" do
|
464
463
|
post :create, :manifestation => @invalid_attrs
|
465
|
-
response.
|
464
|
+
expect(response).to be_forbidden
|
466
465
|
end
|
467
466
|
end
|
468
467
|
end
|
@@ -471,24 +470,24 @@ describe ManifestationsController do
|
|
471
470
|
describe "with valid params" do
|
472
471
|
it "assigns a newly created manifestation as @manifestation" do
|
473
472
|
post :create, :manifestation => @attrs
|
474
|
-
assigns(:manifestation).
|
473
|
+
expect(assigns(:manifestation)).to be_valid
|
475
474
|
end
|
476
475
|
|
477
476
|
it "should be forbidden" do
|
478
477
|
post :create, :manifestation => @attrs
|
479
|
-
response.
|
478
|
+
expect(response).to redirect_to(new_user_session_url)
|
480
479
|
end
|
481
480
|
end
|
482
481
|
|
483
482
|
describe "with invalid params" do
|
484
483
|
it "assigns a newly created but unsaved manifestation as @manifestation" do
|
485
484
|
post :create, :manifestation => @invalid_attrs
|
486
|
-
assigns(:manifestation).
|
485
|
+
expect(assigns(:manifestation)).to_not be_valid
|
487
486
|
end
|
488
487
|
|
489
488
|
it "should be forbidden" do
|
490
489
|
post :create, :manifestation => @invalid_attrs
|
491
|
-
response.
|
490
|
+
expect(response).to redirect_to(new_user_session_url)
|
492
491
|
end
|
493
492
|
end
|
494
493
|
end
|
@@ -511,21 +510,21 @@ describe ManifestationsController do
|
|
511
510
|
end
|
512
511
|
|
513
512
|
it "assigns a series_statement" do
|
514
|
-
put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_statements_attributes => {
|
513
|
+
put :update, :id => @manifestation.id, :manifestation => @attrs.merge(:series_statements_attributes => {"0" => {:original_title => series_statements(:two).original_title, "_destroy"=>"false"}})
|
515
514
|
assigns(:manifestation).reload
|
516
515
|
assigns(:manifestation).series_statements.pluck(:original_title).include?(series_statements(:two).original_title).should be_truthy
|
517
516
|
end
|
518
517
|
|
519
518
|
it "assigns the requested manifestation as @manifestation" do
|
520
519
|
put :update, :id => @manifestation.id, :manifestation => @attrs
|
521
|
-
assigns(:manifestation).
|
520
|
+
expect(assigns(:manifestation)).to eq(@manifestation)
|
522
521
|
end
|
523
522
|
end
|
524
523
|
|
525
524
|
describe "with invalid params" do
|
526
525
|
it "assigns the requested manifestation as @manifestation" do
|
527
526
|
put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
|
528
|
-
response.
|
527
|
+
expect(response).to render_template("edit")
|
529
528
|
end
|
530
529
|
end
|
531
530
|
end
|
@@ -540,20 +539,20 @@ describe ManifestationsController do
|
|
540
539
|
|
541
540
|
it "assigns the requested manifestation as @manifestation" do
|
542
541
|
put :update, :id => @manifestation.id, :manifestation => @attrs
|
543
|
-
assigns(:manifestation).
|
544
|
-
response.
|
542
|
+
expect(assigns(:manifestation)).to eq(@manifestation)
|
543
|
+
expect(response).to redirect_to(@manifestation)
|
545
544
|
end
|
546
545
|
end
|
547
546
|
|
548
547
|
describe "with invalid params" do
|
549
548
|
it "assigns the manifestation as @manifestation" do
|
550
549
|
put :update, :id => @manifestation, :manifestation => @invalid_attrs
|
551
|
-
assigns(:manifestation).
|
550
|
+
expect(assigns(:manifestation)).to_not be_valid
|
552
551
|
end
|
553
552
|
|
554
553
|
it "re-renders the 'edit' template" do
|
555
554
|
put :update, :id => @manifestation, :manifestation => @invalid_attrs
|
556
|
-
response.
|
555
|
+
expect(response).to render_template("edit")
|
557
556
|
end
|
558
557
|
end
|
559
558
|
end
|
@@ -568,15 +567,15 @@ describe ManifestationsController do
|
|
568
567
|
|
569
568
|
it "assigns the requested manifestation as @manifestation" do
|
570
569
|
put :update, :id => @manifestation.id, :manifestation => @attrs
|
571
|
-
assigns(:manifestation).
|
572
|
-
response.
|
570
|
+
expect(assigns(:manifestation)).to eq(@manifestation)
|
571
|
+
expect(response).to be_forbidden
|
573
572
|
end
|
574
573
|
end
|
575
574
|
|
576
575
|
describe "with invalid params" do
|
577
576
|
it "assigns the requested manifestation as @manifestation" do
|
578
577
|
put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
|
579
|
-
response.
|
578
|
+
expect(response).to be_forbidden
|
580
579
|
end
|
581
580
|
end
|
582
581
|
end
|
@@ -589,14 +588,14 @@ describe ManifestationsController do
|
|
589
588
|
|
590
589
|
it "should be forbidden" do
|
591
590
|
put :update, :id => @manifestation.id, :manifestation => @attrs
|
592
|
-
response.
|
591
|
+
expect(response).to redirect_to(new_user_session_url)
|
593
592
|
end
|
594
593
|
end
|
595
594
|
|
596
595
|
describe "with invalid params" do
|
597
596
|
it "assigns the requested manifestation as @manifestation" do
|
598
597
|
put :update, :id => @manifestation.id, :manifestation => @invalid_attrs
|
599
|
-
response.
|
598
|
+
expect(response).to redirect_to(new_user_session_url)
|
600
599
|
end
|
601
600
|
end
|
602
601
|
end
|
@@ -616,17 +615,17 @@ describe ManifestationsController do
|
|
616
615
|
|
617
616
|
it "redirects to the manifestations list" do
|
618
617
|
delete :destroy, :id => @manifestation.id
|
619
|
-
response.
|
618
|
+
expect(response).to redirect_to(manifestations_url)
|
620
619
|
end
|
621
620
|
|
622
621
|
it "should not destroy the reserved manifestation" do
|
623
622
|
delete :destroy, :id => 2
|
624
|
-
response.
|
623
|
+
expect(response).to be_forbidden
|
625
624
|
end
|
626
625
|
|
627
626
|
it "should not destroy manifestation contains items" do
|
628
627
|
delete :destroy, :id => 1
|
629
|
-
response.
|
628
|
+
expect(response).to be_forbidden
|
630
629
|
end
|
631
630
|
end
|
632
631
|
|
@@ -639,7 +638,7 @@ describe ManifestationsController do
|
|
639
638
|
|
640
639
|
it "should be forbidden" do
|
641
640
|
delete :destroy, :id => @manifestation.id
|
642
|
-
response.
|
641
|
+
expect(response).to redirect_to(manifestations_url)
|
643
642
|
end
|
644
643
|
end
|
645
644
|
|
@@ -652,7 +651,7 @@ describe ManifestationsController do
|
|
652
651
|
|
653
652
|
it "should be forbidden" do
|
654
653
|
delete :destroy, :id => @manifestation.id
|
655
|
-
response.
|
654
|
+
expect(response).to be_forbidden
|
656
655
|
end
|
657
656
|
end
|
658
657
|
|
@@ -663,7 +662,7 @@ describe ManifestationsController do
|
|
663
662
|
|
664
663
|
it "should be forbidden" do
|
665
664
|
delete :destroy, :id => @manifestation.id
|
666
|
-
response.
|
665
|
+
expect(response).to redirect_to(new_user_session_url)
|
667
666
|
end
|
668
667
|
end
|
669
668
|
end
|