次のようなコードがたくさんあります。
context 'with invalid attributes' do
it "does not save link to database" do
post :create, board_id: @board, link: FactoryGirl.attributes_for(:link, url: "")
expect(@board.links.count).to eq 0
end
it 're-render :new template' do
post :create, board_id: @board, link: FactoryGirl.attributes_for(:link, url: "")
expect(response).to render_template :new
end
it 'sets an error flash message' do
post :create, board_id: @board, link: FactoryGirl.attributes_for(:link, url: "")
expect(flash[:error]).to_not be_nil
end
end
どのように乾かすことができますか?それぞれの場合に行がありませんpost :create, board_id: @board, link: FactoryGirl.attributes_for(:link, url: "")
か?