Sha256: 2004786bbfe5f9ae747872101f6e73d097df2928f0ab74845ec1ee61be2f6aa1
Contents?: true
Size: 937 Bytes
Versions: 2
Compression:
Stored size: 937 Bytes
Contents
require 'test_helper' class BooksControllerTest < ActionDispatch::IntegrationTest setup do @book = books(:one) end test "should get index" do get books_url assert_response :success end test "should get new" do get new_book_url assert_response :success end test "should create book" do assert_difference('Book.count') do post books_url, params: { book: { } } end assert_redirected_to book_url(Book.last) end test "should show book" do get book_url(@book) assert_response :success end test "should get edit" do get edit_book_url(@book) assert_response :success end test "should update book" do patch book_url(@book), params: { book: { } } assert_redirected_to book_url(@book) end test "should destroy book" do assert_difference('Book.count', -1) do delete book_url(@book) end assert_redirected_to books_url end end
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
sandboxy-2.0.0 | examples/rails_example/test/controllers/books_controller_test.rb |
omniauth-slooob-1.0.0 | examples/rails_example/test/controllers/books_controller_test.rb |