enju_leaf 1.1.0.rc14 → 1.1.0.rc15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/enju_leaf.js +0 -1
  3. data/app/assets/stylesheets/enju.css +5 -2
  4. data/app/assets/stylesheets/images/ajax-loader.gif +0 -0
  5. data/app/assets/stylesheets/images/border.png +0 -0
  6. data/app/assets/stylesheets/images/controls.png +0 -0
  7. data/app/assets/stylesheets/images/icons-18-black.png +0 -0
  8. data/app/assets/stylesheets/images/icons-18-white.png +0 -0
  9. data/app/assets/stylesheets/images/icons-36-black.png +0 -0
  10. data/app/assets/stylesheets/images/icons-36-white.png +0 -0
  11. data/app/assets/stylesheets/images/loading.gif +0 -0
  12. data/app/assets/stylesheets/images/loading_background.png +0 -0
  13. data/app/assets/stylesheets/images/overlay.png +0 -0
  14. data/app/assets/stylesheets/images/spinner_bar.gif +0 -0
  15. data/app/assets/stylesheets/pagination.css +2 -2
  16. data/app/controllers/page_controller.rb +6 -2
  17. data/app/controllers/user_import_results_controller.rb +1 -0
  18. data/app/mailers/notifier.rb +3 -3
  19. data/app/models/enju_leaf/ability.rb +3 -3
  20. data/app/models/profile.rb +3 -1
  21. data/app/models/role.rb +9 -3
  22. data/app/models/user_export_file.rb +2 -1
  23. data/app/models/user_group.rb +2 -2
  24. data/app/models/user_has_role.rb +2 -2
  25. data/app/models/user_import_file.rb +19 -17
  26. data/app/models/user_import_result.rb +3 -3
  27. data/app/views/page/_include.html.erb +40 -0
  28. data/app/views/page/_menu.html.erb +6 -3
  29. data/app/views/page/configuration.html.erb +1 -1
  30. data/app/views/page/{opensearch.builder → opensearch.xml.builder} +4 -4
  31. data/app/views/page/statistics.html.erb +2 -2
  32. data/app/views/user_import_results/show.html.erb +1 -1
  33. data/config/locales/translation_en.yml +2 -1
  34. data/config/locales/translation_ja.yml +3 -1
  35. data/lib/enju_leaf/master_model.rb +3 -3
  36. data/lib/enju_leaf/user.rb +6 -5
  37. data/lib/enju_leaf/version.rb +1 -1
  38. data/lib/enju_leaf.rb +11 -7
  39. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +11 -11
  40. data/lib/generators/enju_leaf/setup/setup_generator.rb +21 -14
  41. data/lib/generators/enju_leaf/setup/templates/db/seeds.rb +5 -1
  42. data/lib/tasks/enju_leaf_tasks.rake +7 -11
  43. data/spec/controllers/my_accounts_controller_spec.rb +2 -2
  44. data/spec/controllers/page_controller_spec.rb +2 -2
  45. data/spec/dummy/config/application.rb +1 -1
  46. data/spec/dummy/config/boot.rb +2 -2
  47. data/spec/dummy/config/initializers/friendly_id.rb +90 -0
  48. data/spec/dummy/db/development.sqlite3 +0 -0
  49. data/spec/dummy/db/migrate/090_create_search_histories.rb +31 -0
  50. data/spec/dummy/db/migrate/20100623173800_rename_search_history_version_to_sru_version.rb +9 -0
  51. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +1 -1
  52. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
  53. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
  54. data/spec/dummy/db/schema.rb +29 -2
  55. data/spec/dummy/db/test.sqlite3 +0 -0
  56. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140820-9103-mfcugd.txt +8 -0
  57. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140822-13160-wz7o56.txt +8 -0
  58. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140824-39018-fw3fdj.txt +8 -0
  59. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140828-69043-tbwoqv.txt +8 -0
  60. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-22971-1jmyywh.txt +8 -0
  61. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-23153-j4x3ru.txt +8 -0
  62. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-67244-1uo8pkb.txt +8 -0
  63. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80298-14af9pc.txt +8 -0
  64. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80450-1qhv5cf.txt +8 -0
  65. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80529-1hahtrn.txt +8 -0
  66. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80725-tqmhnv.txt +8 -0
  67. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81018-wl1hgj.txt +8 -0
  68. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81246-wll5s.txt +8 -0
  69. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81371-8uz50r.txt +8 -0
  70. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-84122-1u96hw6.txt +8 -0
  71. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140926-7716-bbs13d.txt +8 -0
  72. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57000-yu6qop.txt +8 -0
  73. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57206-2j8sg2.txt +8 -0
  74. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57328-p8lryh.txt +8 -0
  75. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57609-1j3dd67.txt +8 -0
  76. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141003-78097-dw5i2k.txt +8 -0
  77. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140820-9103-tuuox.txt +8 -0
  78. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140822-13160-17b5dbh.txt +8 -0
  79. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140824-39018-o12xa4.txt +8 -0
  80. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-22971-d4ul8o.txt +8 -0
  81. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-23153-1qmzqi6.txt +8 -0
  82. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-67244-1ps1qsi.txt +8 -0
  83. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80298-121rh7h.txt +8 -0
  84. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80450-wdetsg.txt +8 -0
  85. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80529-lmet02.txt +8 -0
  86. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80725-1l6tliy.txt +8 -0
  87. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81018-azm74f.txt +8 -0
  88. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81246-1rjpksn.txt +8 -0
  89. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81371-aroaof.txt +8 -0
  90. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-84122-7d6kls.txt +8 -0
  91. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140926-7716-1nap0l.txt +8 -0
  92. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57000-3nb1bj.txt +8 -0
  93. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57206-197ca0p.txt +8 -0
  94. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57328-1kra77f.txt +8 -0
  95. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57609-iymry0.txt +8 -0
  96. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141003-78097-1ocngi2.txt +8 -0
  97. data/spec/dummy/solr/default/data/index/_7b.fdt +0 -0
  98. data/spec/dummy/solr/default/data/index/{_5b.fdx → _7b.fdx} +0 -0
  99. data/spec/dummy/solr/default/data/index/{_5b.fnm → _7b.fnm} +0 -0
  100. data/spec/dummy/solr/default/data/index/{_5b.nvd → _7b.nvd} +0 -0
  101. data/spec/dummy/solr/default/data/index/{_5b.nvm → _7b.nvm} +0 -0
  102. data/spec/dummy/solr/default/data/index/{_5b.si → _7b.si} +0 -0
  103. data/spec/dummy/solr/default/data/index/{_5b_Lucene41_0.doc → _7b_Lucene41_0.doc} +0 -0
  104. data/spec/dummy/solr/default/data/index/{_5b_Lucene41_0.pos → _7b_Lucene41_0.pos} +0 -0
  105. data/spec/dummy/solr/default/data/index/{_5b_Lucene41_0.tim → _7b_Lucene41_0.tim} +0 -0
  106. data/spec/dummy/solr/default/data/index/{_5b_Lucene41_0.tip → _7b_Lucene41_0.tip} +0 -0
  107. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  108. data/spec/dummy/solr/default/data/index/segments_ev +0 -0
  109. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000524 +0 -0
  110. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000525 +0 -0
  111. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000526 +0 -0
  112. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000527 +0 -0
  113. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000528 +0 -0
  114. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000529 +0 -0
  115. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000530 +0 -0
  116. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000531 +0 -0
  117. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000532 +0 -0
  118. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000533 +0 -0
  119. data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
  120. data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
  121. data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
  122. data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
  123. data/spec/dummy/tmp/cache/stdout +898 -0
  124. data/spec/dummy/tmp/pids/redis-test.pid +1 -1
  125. data/spec/fixtures/library_groups.yml +3 -3
  126. data/spec/fixtures/manifestations.yml +5 -6
  127. data/spec/fixtures/roles.yml +4 -0
  128. data/spec/fixtures/users.yml +1 -1
  129. data/spec/views/page/about.html.erb_spec.rb +19 -0
  130. data/spec/views/page/advanced_search.html.erb_spec.rb +20 -0
  131. data/spec/views/page/configuration.html.erb_spec.rb +19 -0
  132. data/spec/views/page/export.html.erb_spec.rb +19 -0
  133. data/spec/views/page/import.html.erb_spec.rb +19 -0
  134. data/spec/views/page/index.html.erb_spec.rb +20 -0
  135. data/spec/views/page/opensearch.xml.builder_spec.rb +20 -0
  136. data/spec/views/page/statistics.html.erb_spec.rb +20 -0
  137. data/spec/views/profiles/edit.html.erb_spec.rb +1 -1
  138. data/spec/views/profiles/index.html.erb_spec.rb +2 -2
  139. data/spec/views/profiles/new.html.erb_spec.rb +1 -1
  140. data/spec/views/profiles/show.html.erb_spec.rb +1 -1
  141. metadata +185 -76
  142. data/app/assets/images/ie6/borderBottomCenter.png +0 -0
  143. data/app/assets/images/ie6/borderBottomLeft.png +0 -0
  144. data/app/assets/images/ie6/borderBottomRight.png +0 -0
  145. data/app/assets/images/ie6/borderMiddleLeft.png +0 -0
  146. data/app/assets/images/ie6/borderMiddleRight.png +0 -0
  147. data/app/assets/images/ie6/borderTopCenter.png +0 -0
  148. data/app/assets/images/ie6/borderTopLeft.png +0 -0
  149. data/app/assets/images/ie6/borderTopRight.png +0 -0
  150. data/spec/dummy/solr/default/data/index/_5b.fdt +0 -0
  151. data/spec/dummy/solr/default/data/index/segments_av +0 -0
  152. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000380 +0 -0
  153. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000381 +0 -0
  154. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000382 +0 -0
  155. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000383 +0 -0
  156. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000384 +0 -0
  157. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000385 +0 -0
  158. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000386 +0 -0
  159. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000387 +0 -0
  160. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000388 +0 -0
  161. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000389 +0 -0
  162. data/spec/fixtures/extents.yml +0 -29
@@ -1 +1 @@
1
- 82483
1
+ 78102
@@ -1,9 +1,9 @@
1
1
  # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
2
  one:
3
3
  id: 1
4
- name: unknown
5
- display_name: unknown
6
- short_name: unknown
4
+ name: enju
5
+ display_name: Next-L Enju
6
+ short_name: Enju
7
7
  note:
8
8
  my_networks: 0.0.0.0/0
9
9
  url: "http://localhost:3000/"
@@ -1581,7 +1581,7 @@ manifestation_00201:
1581
1581
  width:
1582
1582
  created_at: 2007-11-19 17:55:41 UTC
1583
1583
  frequency_id: 3
1584
- periodical: true
1584
+ serial: true
1585
1585
  manifestation_00202:
1586
1586
  carrier_type_id: 1
1587
1587
  language_id: 1
@@ -1600,7 +1600,7 @@ manifestation_00202:
1600
1600
  serial_number: 2
1601
1601
  volume_number: 1
1602
1602
  issue_number: 2
1603
- periodical: true
1603
+ serial: true
1604
1604
  manifestation_00203:
1605
1605
  carrier_type_id: 1
1606
1606
  language_id: 1
@@ -1616,7 +1616,7 @@ manifestation_00203:
1616
1616
  width:
1617
1617
  created_at: 2010-03-03 17:00:00 UTC
1618
1618
  frequency_id: 1
1619
- periodical: false
1619
+ serial: false
1620
1620
  manifestation_00204:
1621
1621
  carrier_type_id: 1
1622
1622
  language_id: 1
@@ -1631,7 +1631,7 @@ manifestation_00204:
1631
1631
  height:
1632
1632
  width:
1633
1633
  created_at: 2010-03-03 20:00:00 UTC
1634
- periodical: true
1634
+ serial: true
1635
1635
  manifestation_00205:
1636
1636
  carrier_type_id: 1
1637
1637
  language_id: 1
@@ -1876,8 +1876,7 @@ manifestation_00216:
1876
1876
  # attachment_meta :text
1877
1877
  # month_of_publication :integer
1878
1878
  # fulltext_content :boolean
1879
- # doi :string(255)
1880
- # periodical :boolean
1879
+ # serial :boolean
1881
1880
  # statement_of_responsibility :text
1882
1881
  #
1883
1882
 
@@ -4,21 +4,25 @@ role_00001:
4
4
  display_name: Guest
5
5
  id: 1
6
6
  note:
7
+ position: 1
7
8
  role_00002:
8
9
  name: User
9
10
  display_name: User
10
11
  id: 2
11
12
  note:
13
+ position: 2
12
14
  role_00003:
13
15
  name: Librarian
14
16
  display_name: Librarian
15
17
  id: 3
16
18
  note:
19
+ position: 3
17
20
  role_00004:
18
21
  name: Administrator
19
22
  display_name: Administrator
20
23
  id: 4
21
24
  note:
25
+ position: 4
22
26
 
23
27
  # == Schema Information
24
28
  #
@@ -3,7 +3,7 @@ admin:
3
3
  updated_at: 2008-05-31 13:16:30.163731 +09:00
4
4
  encrypted_password: $2a$10$vHohD1WflnTIqAa8zMkF9evwAgIZRw3XuR4d3bi29M.jph/MB/AJi
5
5
  id: 1
6
- username: admin
6
+ username: enjuadmin
7
7
  email: tanabe@kamata.lib.teu.ac.jp
8
8
  created_at: 2007-11-19 16:58:32.111941 +09:00
9
9
  librarian1:
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/about" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
9
+ @ability = Object.new
10
+ @ability.extend(CanCan::Ability)
11
+ controller.stub(:current_ability) { @ability }
12
+ end
13
+
14
+ it "renders attributes in <p>" do
15
+ render
16
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
17
+ rendered.should match(/About this system/)
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/advanced_search" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ assign(:libraries, Library.all)
9
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
10
+ @ability = Object.new
11
+ @ability.extend(CanCan::Ability)
12
+ controller.stub(:current_ability) { @ability }
13
+ end
14
+
15
+ it "renders attributes in <p>" do
16
+ render
17
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
18
+ rendered.should match(/Advanced search/)
19
+ end
20
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/configuration" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
9
+ @ability = Object.new
10
+ @ability.extend(CanCan::Ability)
11
+ controller.stub(:current_ability) { @ability }
12
+ end
13
+
14
+ it "renders attributes in <p>" do
15
+ render
16
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
17
+ rendered.should match(/Checkout/)
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/export" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
9
+ @ability = Object.new
10
+ @ability.extend(CanCan::Ability)
11
+ controller.stub(:current_ability) { @ability }
12
+ end
13
+
14
+ it "renders attributes in <p>" do
15
+ render
16
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
17
+ rendered.should match(/Export/)
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/import" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
9
+ @ability = Object.new
10
+ @ability.extend(CanCan::Ability)
11
+ controller.stub(:current_ability) { @ability }
12
+ end
13
+
14
+ it "renders attributes in <p>" do
15
+ render
16
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
17
+ rendered.should match(/Import/)
18
+ end
19
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/index" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ assign(:tags, Tag.all)
9
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
10
+ @ability = Object.new
11
+ @ability.extend(CanCan::Ability)
12
+ controller.stub(:current_ability) { @ability }
13
+ end
14
+
15
+ it "renders attributes in <p>" do
16
+ render
17
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
18
+ rendered.should match(/Catalog search/)
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/opensearch" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ assign(:library_group, LibraryGroup.site_config)
9
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
10
+ @ability = Object.new
11
+ @ability.extend(CanCan::Ability)
12
+ controller.stub(:current_ability) { @ability }
13
+ end
14
+
15
+ it "renders the XML template" do
16
+ render
17
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
18
+ rendered.should match(/Library Catalog/)
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require 'spec_helper'
3
+
4
+ describe "page/statistics" do
5
+ fixtures :all
6
+
7
+ before(:each) do
8
+ @profile = assign(:profile, profiles(:admin))
9
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
10
+ @ability = Object.new
11
+ @ability.extend(CanCan::Ability)
12
+ controller.stub(:current_ability) { @ability }
13
+ end
14
+
15
+ it "renders attributes in <p>" do
16
+ render
17
+ # Run the generator again with the --webrat flag if you want to use webrat matchers
18
+ rendered.should match(/Checkout/)
19
+ end
20
+ end
@@ -9,7 +9,7 @@ describe "profiles/edit" do
9
9
  assign(:libraries, Library.all)
10
10
  assign(:roles, Role.all)
11
11
  assign(:available_languages, Language.available_languages)
12
- view.stub(:current_user).and_return(User.find('admin'))
12
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
13
13
  end
14
14
 
15
15
  it "renders the edit user form" do
@@ -5,12 +5,12 @@ describe "profiles/index" do
5
5
 
6
6
  before(:each) do
7
7
  assign(:profiles, Profile.page(1))
8
- view.stub(:current_user).and_return(User.find('admin'))
8
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
9
9
  end
10
10
 
11
11
  it "renders a list of profiles" do
12
12
  render
13
13
  # Run the generator again with the --webrat flag if you want to use webrat matchers
14
- assert_select "tr>td", :text => 'admin'
14
+ assert_select "tr>td", :text => 'enjuadmin'
15
15
  end
16
16
  end
@@ -11,7 +11,7 @@ describe "profiles/new" do
11
11
  assign(:libraries, Library.all)
12
12
  assign(:roles, Role.all)
13
13
  assign(:available_languages, Language.available_languages)
14
- view.stub(:current_user).and_return(User.find('admin'))
14
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
15
15
  end
16
16
 
17
17
  it "renders new user form" do
@@ -6,7 +6,7 @@ describe "profiles/show" do
6
6
 
7
7
  before(:each) do
8
8
  @profile = assign(:profile, profiles(:admin))
9
- view.stub(:current_user).and_return(User.find('admin'))
9
+ view.stub(:current_user).and_return(User.find('enjuadmin'))
10
10
  @ability = Object.new
11
11
  @ability.extend(CanCan::Ability)
12
12
  controller.stub(:current_ability) { @ability }