Add working test

This commit is contained in:
Ari Timonen 2019-10-18 02:51:40 +03:00
parent 758dfda988
commit bb08000f1e
7 changed files with 30 additions and 7 deletions

View file

@ -11,7 +11,7 @@ PUMA_PORT=4000
PUMA_TIMEOUT=30
MYSQL_HOST=db
MYSQL_DATABASE=ensl
MYSQL_DATABASE=ensl_test
MYSQL_USERNAME=ensl
MYSQL_PASSWORD=ensl
MYSQL_ROOT_PASSWORD=ensl

1
.gitignore vendored
View file

@ -16,6 +16,7 @@
db_data*
db_data/*
!db_data/.placeholder
*.sql
# OS X
.DS_Store

View file

@ -67,6 +67,7 @@ group :test do
gem 'selenium-webdriver', '~> 2.47.1'
gem 'factory_girl_rails', '~> 4.4.1'
gem 'timecop', '~> 0.7.1'
gem 'rspec'
end
group :development, :test do

View file

@ -214,6 +214,10 @@ GEM
ffi (~> 1.0)
ref (2.0.0)
rmagick (2.13.4)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.2)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.1)
@ -338,6 +342,7 @@ DEPENDENCIES
rails (~> 4.1.16)
rails_autolink (~> 1.1.5)
rmagick (~> 2.13.4)
rspec
rspec-rails (~> 3.3.3)
sanitize (~> 2.1.0)
sass-rails (~> 5.0.3)

View file

@ -25,12 +25,12 @@ services:
- "./db_data:/var/lib/mysql"
- "./ext/mysql.conf.d:/etc/mysql/conf.d"
environment:
- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_USERNAME
- MYSQL_PASSWORD
- MYSQL_ROOT_PASSWORD
- MYSQL_ROOT_HOST
- MYSQL_DATABASE=ensl
- MYSQL_USER=ensl
- MYSQL_USERNAME=ensl
- MYSQL_PASSWORD=ensl
- MYSQL_ROOT_PASSWORD=ensl
- MYSQL_ROOT_HOST=%
memcached:
image: memcached:latest
#redis:

View file

@ -0,0 +1,8 @@
require 'rails_helper'
RSpec.describe ArticlesController, type: :controller do
it "renders the index template" do
get :index
expect(response).to render_template("index")
end
end

View file

@ -0,0 +1,8 @@
require 'rails_helper'
RSpec.describe ShoutmsgsController, type: :controller do
it "renders the index template" do
get :index
expect(response).to render_template("index")
end
end