1 # -*- encoding: utf-8 -*-
\r
4 describe ComicsController do
5 # This should return the minimal set of attributes required to create a valid
6 # Comic. As you add validations to Comic, be sure to
7 # update the return value of this method accordingly.
9 {:title => 'test comic', :width => 100, :height => 50, :visible => 0, :editable => 0}
12 describe '一覧表示に於いて' do
15 @user = Factory( :user_yas)
16 Factory :normal_comic, :author_id => 1
17 Factory :visible_comic, :author_id => 1
18 Factory:editable_comic, :author_id => 1
19 Factory :hidden_comic, :author_id => 1
22 context '作家権限がないとき' do
23 context 'ただし、公開型のときだけは' do
24 it 'ステータスコード200 OKを返す' do
28 response.should be_success
34 describe '単体表示に於いて' do
37 @user = Factory( :user_yas)
38 @comic = Factory :normal_comic, :author_id => 1
39 Factory :visible_comic, :author_id => 1
40 Factory:editable_comic, :author_id => 1
41 @hidden = Factory :hidden_comic, :author_id => 1
44 context '作家権限がないとき' do
45 context 'ただし、公開型のときだけは' do
46 it 'ステータスコード200 OKを返す' do
48 get :show, :id => @comic.id
49 response.should be_success