assigns(:authors).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :index
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'indexテンプレートを描画する' do
get :index
response.should render_template("index")
@other_author = FactoryGirl.create :author, :user_id => @other_user.id
@other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
@comic = FactoryGirl.create :comic, :author_id => @other_user.author.id
+ Author.stub(:show).and_return(@other_author)
Comic.stub(:himlist).and_return([@comic, @comic, @comic])
sign_in @user
end
assigns(:comics).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :comics, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'comicsテンプレートを描画する' do
get :comics, :id => @other_author.id
response.should render_template("comics")
@comic = FactoryGirl.create :comic, :author_id => @other_user.author.id
@panel = FactoryGirl.create :panel, :author_id => @other_user.author.id
@story = FactoryGirl.create :story, :t => 0, :comic_id => @comic.id, :panel_id => @panel.id, :author_id => @other_user.author.id
+ Author.stub(:show).and_return(@other_author)
Story.stub(:himlist).and_return([@story, @story, @story])
sign_in @user
end
assigns(:stories).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :stories, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'storiesテンプレートを描画する' do
get :stories, :id => @other_author.id
response.should render_template("stories")
@other_author = FactoryGirl.create :author, :user_id => @other_user.id
@other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
@panel = FactoryGirl.create :panel, :author_id => @other_author.id
+ Author.stub(:show).and_return(@other_author)
Panel.stub(:himlist).and_return([@panel, @panel, @panel])
sign_in @user
end
assigns(:panels).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :panels, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'panelsテンプレートを描画する' do
get :panels, :id => @other_author.id
response.should render_template("panels")
@rp = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
@panel = FactoryGirl.create :panel, :author_id => @author.id
@panel_picture = FactoryGirl.create :panel_picture, :picture_id => @p.id, :panel_id => @panel.id, :width => @p.width, :height => @p.height
+ Author.stub(:show).and_return(@other_author)
PanelPicture.stub(:himlist).and_return([@panel_picture, @panel_picture, @panel_picture])
sign_in @user
end
assigns(:panel_pictures).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :panel_pictures, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'panel_picturesテンプレートを描画する' do
get :panel_pictures, :id => @other_author.id
response.should render_template("panel_pictures")
@rp = FactoryGirl.create :resource_picture, :artist_id => @artist.id, :license_id => @license.id, :original_picture_id => @op.id, :picture_id => @p.id
@panel = FactoryGirl.create :panel, :author_id => @author.id
@ground_picture = FactoryGirl.create :ground_picture, :panel_id => @panel.id, :picture_id => @p.id
+ Author.stub(:show).and_return(@other_author)
GroundPicture.stub(:himlist).and_return([@ground_picture, @ground_picture, @ground_picture])
sign_in @user
end
assigns(:ground_pictures).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :ground_pictures, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'ground_picturesテンプレートを描画する' do
get :ground_pictures, :id => @other_author.id
response.should render_template("ground_pictures")
@other_artist = FactoryGirl.create :artist_yas, :author_id => @other_author.id
@gc = FactoryGirl.create :ground_color
@panel = FactoryGirl.create :panel, :author_id => @author.id
+ Author.stub(:show).and_return(@other_author)
GroundColor.stub(:himlist).and_return([@gc, @gc, @gc])
sign_in @user
end
assigns(:ground_colors).should have_at_least(3).items
end
context 'html形式' do
+ it '@paginateにページ制御を取得している' do
+ get :ground_colors, :id => @other_author.id
+ assigns(:paginate).is_a?(Kaminari::PaginatableArray).should be_true
+ end
it 'ground_colorsテンプレートを描画する' do
get :ground_colors, :id => @other_author.id
response.should render_template("ground_colors")