Commit 1ac1290f by Mai Hoang Thai Ha

add test

parent 66154e56
Pipeline #1194 failed with stages
in 0 seconds
...@@ -51,6 +51,11 @@ group :test do ...@@ -51,6 +51,11 @@ group :test do
gem 'selenium-webdriver' gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers # Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers' gem 'webdrivers'
gem 'rails-controller-testing', '1.0.5'
gem 'minitest', '5.14.4'
gem 'minitest-reporters', '1.3.8'
gem 'guard', '2.16.2'
gem 'guard-minitest', '2.4.6'
end end
group :production do group :production do
......
...@@ -62,6 +62,7 @@ GEM ...@@ -62,6 +62,7 @@ GEM
zeitwerk (~> 2.3) zeitwerk (~> 2.3)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
ansi (1.5.0)
bindex (0.8.1) bindex (0.8.1)
bootsnap (1.7.5) bootsnap (1.7.5)
msgpack (~> 1.0) msgpack (~> 1.0)
...@@ -76,12 +77,27 @@ GEM ...@@ -76,12 +77,27 @@ GEM
regexp_parser (>= 1.5, < 3.0) regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2) xpath (~> 3.2)
childprocess (3.0.0) childprocess (3.0.0)
coderay (1.1.3)
concurrent-ruby (1.1.8) concurrent-ruby (1.1.8)
crass (1.0.6) crass (1.0.6)
erubi (1.10.0) erubi (1.10.0)
ffi (1.15.1) ffi (1.15.1)
formatador (0.2.5)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
guard (2.16.2)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-minitest (2.4.6)
guard-compat (~> 1.2)
minitest (>= 3.0)
i18n (1.8.10) i18n (1.8.10)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jbuilder (2.11.2) jbuilder (2.11.2)
...@@ -92,17 +108,30 @@ GEM ...@@ -92,17 +108,30 @@ GEM
loofah (2.9.1) loofah (2.9.1)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
lumberjack (1.2.8)
mail (2.7.1) mail (2.7.1)
mini_mime (>= 0.1.1) mini_mime (>= 0.1.1)
marcel (1.0.1) marcel (1.0.1)
method_source (1.0.0) method_source (1.0.0)
mini_mime (1.0.3) mini_mime (1.0.3)
minitest (5.14.4) minitest (5.14.4)
minitest-reporters (1.3.8)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
msgpack (1.4.2) msgpack (1.4.2)
nenv (0.3.0)
nio4r (2.5.7) nio4r (2.5.7)
nokogiri (1.11.6-x86_64-linux) nokogiri (1.11.6-x86_64-linux)
racc (~> 1.4) racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
pg (1.1.4) pg (1.1.4)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6) public_suffix (4.0.6)
puma (5.3.2) puma (5.3.2)
nio4r (~> 2.0) nio4r (~> 2.0)
...@@ -129,6 +158,10 @@ GEM ...@@ -129,6 +158,10 @@ GEM
bundler (>= 1.15.0) bundler (>= 1.15.0)
railties (= 6.1.3.2) railties (= 6.1.3.2)
sprockets-rails (>= 2.0.0) sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
actionview (>= 5.0.1.rc1)
activesupport (>= 5.0.1.rc1)
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
...@@ -145,6 +178,7 @@ GEM ...@@ -145,6 +178,7 @@ GEM
rb-inotify (0.10.1) rb-inotify (0.10.1)
ffi (~> 1.0) ffi (~> 1.0)
regexp_parser (2.1.1) regexp_parser (2.1.1)
ruby-progressbar (1.11.0)
rubyzip (2.3.0) rubyzip (2.3.0)
sass-rails (6.0.0) sass-rails (6.0.0)
sassc-rails (~> 2.1, >= 2.1.1) sassc-rails (~> 2.1, >= 2.1.1)
...@@ -160,6 +194,7 @@ GEM ...@@ -160,6 +194,7 @@ GEM
childprocess (>= 0.5, < 4.0) childprocess (>= 0.5, < 4.0)
rubyzip (>= 1.2.2) rubyzip (>= 1.2.2)
semantic_range (3.0.0) semantic_range (3.0.0)
shellany (0.0.1)
spring (2.1.1) spring (2.1.1)
sprockets (4.0.2) sprockets (4.0.2)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
...@@ -204,12 +239,17 @@ DEPENDENCIES ...@@ -204,12 +239,17 @@ DEPENDENCIES
bootsnap (>= 1.4.4) bootsnap (>= 1.4.4)
byebug byebug
capybara (>= 3.26) capybara (>= 3.26)
guard (= 2.16.2)
guard-minitest (= 2.4.6)
jbuilder (~> 2.7) jbuilder (~> 2.7)
listen (~> 3.3) listen (~> 3.3)
minitest (= 5.14.4)
minitest-reporters (= 1.3.8)
pg (= 1.1.4) pg (= 1.1.4)
puma (~> 5.0) puma (~> 5.0)
rack-mini-profiler (~> 2.0) rack-mini-profiler (~> 2.0)
rails (~> 6.1.3, >= 6.1.3.2) rails (~> 6.1.3, >= 6.1.3.2)
rails-controller-testing (= 1.0.5)
sass-rails (>= 6) sass-rails (>= 6)
selenium-webdriver selenium-webdriver
spring spring
...@@ -224,4 +264,4 @@ RUBY VERSION ...@@ -224,4 +264,4 @@ RUBY VERSION
ruby 3.0.1p64 ruby 3.0.1p64
BUNDLED WITH BUNDLED WITH
2.2.17 2.2.18
<h1>StaticPages#help</h1> <h1>StaticPages#help</h1>
<p>Find me in app/views/static_pages/help.html.erb</p> <p>Find me in app/views/static_pages/help.html.erb</p>
<div style="position: fixed; top: 10px; right: 100px" >
hehe
</div>
<h1>StaticPages#home</h1> <h1>StaticPages#home</h1>
<ul>
<li>day la dong 1</li>
<li>day la dong 2</li>
<li>day la dong 3</li>
<li>day la dong 4</li>
</ul>
<a href="https://fb.com/hafmai"></a>
<p>Find me in app/views/static_pages/home.html.erb</p> <p>Find me in app/views/static_pages/home.html.erb</p>
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 0) do
end
require "test_helper" require "test_helper"
# require File.dirname(__FILE__) + '/../test_helper'
class StaticPagesControllerTest < ActionDispatch::IntegrationTest class StaticPagesControllerTest < ActionDispatch::IntegrationTest
test "should get home" do test "should get home" do
get static_pages_home_url get static_pages_home_url
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment