Welcome to mirror list, hosted at ThFree Co, Russian Federation.

books_controller_test.rb « functional « test - github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 994258b70711a9c9d72d7ff5f411f1994e193c4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# frozen_string_literal: true

require "test_helper"

class BooksControllerTest < ActionController::TestCase
  test "redirects old book site" do
    get :show, params: { lang: "1_welcome_to_git" }
    assert_redirected_to controller: "books", action: "show", lang: "en/Getting-Started"
  end

  test "gets the book page" do
    book = FactoryBot.create(:book, code: "en")
    get :show, params: { lang: "en" }
    assert_response :success
  end

  test "gets the book section page" do
  end

  test "gets the progit page" do
    section = FactoryBot.create(:section)
    get :chapter, params: { chapter: section.chapter.number, section: section.number }
    assert_response :success
  end
end