1 # -*- encoding: utf-8 -*-
5 describe Pettanr::Item do
7 SpeechBalloonTemplate.delete_all
8 @admin = FactoryGirl.create :admin
9 @user = FactoryGirl.create( :user_yas)
10 @author = FactoryGirl.create :author, :user_id => @user.id
11 @artist = FactoryGirl.create :artist_yas, :author_id => @author.id
12 @other_user = FactoryGirl.create( :user_yas)
13 @other_author = FactoryGirl.create :author, :user_id => @other_user.id
14 @other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
15 @sp = FactoryGirl.create :system_picture
16 @lg = FactoryGirl.create :license_group
17 @license = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
24 context 'オーソドックスなデータのとき' do
43 @gc = User.default_page_size
47 @gc = User.max_page_size
51 @gc = User.page_number
67 @gc = User.list_paginate
75 @gc = User.list_json_opt
87 @gc = User.show_json_opt
93 context 'オーソドックスなデータのとき' do
107 @user.dom_id_item_field ''
116 @user.tag_item_attributes
119 @user.field_tag_attributes
122 @user.any_tag_attributes
125 @user.select_tag_attributes
139 context 'オーソドックスなデータのとき' do
141 @gc = Pettanr::Item.singular
145 @gc = Pettanr::Item.plural
149 @gc = Pettanr::Item.item_name
153 @gc = Pettanr::Item.path_name
157 @gc = Pettanr::Item.default_page_size
161 @gc = Pettanr::Item.max_page_size
165 @gc = Pettanr::Item.page
169 @gc = Pettanr::Item.page_size
173 @gc = Pettanr::Item.list_where
177 @gc = Pettanr::Item.list
181 @gc = Pettanr::Item.list_paginate
185 @gc = Pettanr::Item.list_opt
189 @gc = Pettanr::Item.list_json_opt
193 @gc = Pettanr::Item.show 1, 1
197 @gc = Pettanr::Item.show_opt
201 @gc = Pettanr::Item.show_json_opt