Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
be0ddcc89e | ||
|
|
654ec39f36 |
Vendored
+12
-2
@@ -83,12 +83,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Set up database
|
||||||
|
env:
|
||||||
|
RAILS_ENV: test
|
||||||
|
run: bin/rails db:create db:structure:load
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
env:
|
env:
|
||||||
RAILS_ENV: test
|
RAILS_ENV: test
|
||||||
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
||||||
# REDIS_URL: redis://localhost:6379/0
|
# REDIS_URL: redis://localhost:6379/0
|
||||||
run: bin/rails db:test:prepare test
|
run: bin/rails test
|
||||||
|
|
||||||
system-test:
|
system-test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -108,12 +113,17 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
|
|
||||||
|
- name: Set up database
|
||||||
|
env:
|
||||||
|
RAILS_ENV: test
|
||||||
|
run: bin/rails db:create db:structure:load
|
||||||
|
|
||||||
- name: Run System Tests
|
- name: Run System Tests
|
||||||
env:
|
env:
|
||||||
RAILS_ENV: test
|
RAILS_ENV: test
|
||||||
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
# RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
|
||||||
# REDIS_URL: redis://localhost:6379/0
|
# REDIS_URL: redis://localhost:6379/0
|
||||||
run: bin/rails db:test:prepare test:system
|
run: bin/rails test:system
|
||||||
|
|
||||||
- name: Keep screenshots from failed system tests
|
- name: Keep screenshots from failed system tests
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|||||||
+3
-3
@@ -34,13 +34,13 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
|
|
||||||
resources :entries do
|
resources :entries do
|
||||||
resources :comments, only: [:create]
|
resources :comments, only: [ :create ]
|
||||||
collection do
|
collection do
|
||||||
get :download
|
get :download
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
resources :suggested_meanings
|
resources :suggested_meanings
|
||||||
resources :comments, only: [:create, :update, :destroy]
|
resources :comments, only: [ :create, :update, :destroy ]
|
||||||
resources :supported_languages, only: [:index, :show]
|
resources :supported_languages, only: [ :index, :show ]
|
||||||
resources :users
|
resources :users
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -18,6 +18,5 @@ class CreateSuggestedMeanings < ActiveRecord::Migration[8.1]
|
|||||||
|
|
||||||
t.timestamps
|
t.timestamps
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -37,5 +37,4 @@ class CommentTest < ActiveSupport::TestCase
|
|||||||
comment = Comment.new(user: user, body: "This is a comment.", language: language)
|
comment = Comment.new(user: user, body: "This is a comment.", language: language)
|
||||||
assert_not comment.valid?
|
assert_not comment.valid?
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user