+# -*- encoding: utf-8 -*-\r
require 'spec_helper'\r
+#スクロール\r
\r
describe 'scrolls/show.html.erb' do\r
before do\r
- @user = FactoryGirl.create( :user_yas)\r
- @author = FactoryGirl.create :author, :user_id => @user.id\r
+ @admin =FactoryGirl.create :admin\r
+ @user_yas = FactoryGirl.create :user_yas_with_owner\r
+ @user_rom = FactoryGirl.create :user_rom\r
+ @author_yas = @user_yas.author\r
+ \r
end\r
\r
- context 'with 2 widgets' do\r
+ describe 'エディタ' do\r
before(:each) do\r
- @scroll = FactoryGirl.create :scroll, :author_id => @author.id\r
- @operators = Operator.new [@user, @author, @artist, @admin, @demand_user]\r
- assign(:item, @scroll)\r
+ @item = FactoryGirl.create :scroll_hello, author: @author_yas\r
+ @item_id = @item.id\r
+ @operators = Operator.new [@user_yas, @author_yas, @artist, @admin, @demand_user]\r
+ assign(:item, @item)\r
assign(:play_count, 3)\r
assign(:operators, @operators)\r
end\r
\r
- it 'rendered' do\r
- render\r
- \r
- rendered.should contain('icon')\r
+ context 'ownerなとき' do\r
+ it 'rendered' do\r
+ render\r
+ \r
+ rendered.should have_tag('h3.edit')\r
+ end\r
end\r
end\r
end\r