mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 15:43:14 +01:00
Remove unused test/ directory
This commit is contained in:
parent
5c2e1bfe1e
commit
377d7d1ba8
15 changed files with 0 additions and 129 deletions
|
@ -1,7 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class SearchControllerTest < ActionController::TestCase
|
|
||||||
# test "the truth" do
|
|
||||||
# assert true
|
|
||||||
# end
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class SessionsControllerTest < ActionController::TestCase
|
|
||||||
# test "the truth" do
|
|
||||||
# assert true
|
|
||||||
# end
|
|
||||||
end
|
|
0
test/fixtures/.keep
vendored
0
test/fixtures/.keep
vendored
11
test/fixtures/importers.yml
vendored
11
test/fixtures/importers.yml
vendored
|
@ -1,11 +0,0 @@
|
||||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
|
||||||
|
|
||||||
# This model initially had no columns defined. If you add columns to the
|
|
||||||
# model remove the '{}' from the fixture names and add the columns immediately
|
|
||||||
# below each fixture, per the syntax in the comments below
|
|
||||||
#
|
|
||||||
one: {}
|
|
||||||
# column: value
|
|
||||||
#
|
|
||||||
two: {}
|
|
||||||
# column: value
|
|
11
test/fixtures/users.yml
vendored
11
test/fixtures/users.yml
vendored
|
@ -1,11 +0,0 @@
|
||||||
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
|
||||||
|
|
||||||
# This model initially had no columns defined. If you add columns to the
|
|
||||||
# model remove the '{}' from the fixture names and add the columns immediately
|
|
||||||
# below each fixture, per the syntax in the comments below
|
|
||||||
#
|
|
||||||
one: {}
|
|
||||||
# column: value
|
|
||||||
#
|
|
||||||
two: {}
|
|
||||||
# column: value
|
|
|
@ -1,8 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class RoutesTest < ActionDispatch::IntegrationTest
|
|
||||||
test "route test" do
|
|
||||||
assert_generates "/import", { :controller => "import", :action => "new_papers_callback" }
|
|
||||||
assert_generates "/", :controller => "search", :action => "index"
|
|
||||||
end
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class ImporterTest < ActiveSupport::TestCase
|
|
||||||
# test "the truth" do
|
|
||||||
# assert true
|
|
||||||
# end
|
|
||||||
end
|
|
|
@ -1,52 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class PaperTest < ActiveSupport::TestCase
|
|
||||||
|
|
||||||
context "Validations" do
|
|
||||||
should validate_presence_of(:name)
|
|
||||||
should validate_length_of(:name).is_at_most(1000)
|
|
||||||
|
|
||||||
should validate_presence_of(:url)
|
|
||||||
should validate_length_of(:url).is_at_most(1000)
|
|
||||||
context "URL uniqueness" do
|
|
||||||
subject { FactoryBot.build(:paper) }
|
|
||||||
should validate_uniqueness_of(:url)
|
|
||||||
end
|
|
||||||
should "validate url format sane" do
|
|
||||||
expected_error = "ist keine gültige URL"
|
|
||||||
paper = FactoryBot.build(:paper, url: "wtf")
|
|
||||||
assert_not paper.valid?, "Expected paper to not be valid with invalid URL"
|
|
||||||
assert_not paper.errors[:url].empty?
|
|
||||||
assert paper.errors[:url].include?(expected_error), "Expected #{paper.errors[:url]} to include \"#{expected_error}\""
|
|
||||||
end
|
|
||||||
|
|
||||||
should validate_presence_of(:reference)
|
|
||||||
should validate_length_of(:reference).is_at_most(100)
|
|
||||||
|
|
||||||
should validate_presence_of(:body)
|
|
||||||
should validate_length_of(:body).is_at_most(100)
|
|
||||||
|
|
||||||
should validate_presence_of(:content)
|
|
||||||
should validate_length_of(:content).is_at_most(100_000)
|
|
||||||
|
|
||||||
should validate_presence_of(:originator)
|
|
||||||
should validate_length_of(:originator).is_at_most(300)
|
|
||||||
|
|
||||||
should validate_presence_of(:paper_type)
|
|
||||||
should validate_length_of(:paper_type).is_at_most(50)
|
|
||||||
|
|
||||||
context "published_at" do
|
|
||||||
should validate_presence_of(:published_at)
|
|
||||||
should "validate date is parseable" do
|
|
||||||
expected_error = "ist kein gültiges Datum"
|
|
||||||
paper = FactoryBot.build(:paper, published_at: "fubar")
|
|
||||||
assert_not paper.valid?
|
|
||||||
assert_not paper.errors[:published_at].empty?
|
|
||||||
assert paper.errors[:published_at].include?(expected_error), "Expected #{paper.errors[:published_at]} to include \"#{expected_error}\""
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
should validate_length_of(:resolution).is_at_most(30_000)
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -1,7 +0,0 @@
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class UserTest < ActiveSupport::TestCase
|
|
||||||
# test "the truth" do
|
|
||||||
# assert true
|
|
||||||
# end
|
|
||||||
end
|
|
|
@ -1,19 +0,0 @@
|
||||||
require 'simplecov'
|
|
||||||
SimpleCov.start 'rails'
|
|
||||||
|
|
||||||
ENV['RAILS_ENV'] ||= 'test'
|
|
||||||
require File.expand_path('../../config/environment', __FILE__)
|
|
||||||
require 'rails/test_help'
|
|
||||||
require 'capybara/rails'
|
|
||||||
|
|
||||||
class ActiveSupport::TestCase
|
|
||||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
|
||||||
# fixtures :all
|
|
||||||
|
|
||||||
# Add more helper methods to be used by all tests here...
|
|
||||||
end
|
|
||||||
|
|
||||||
class ActionDispatch::IntegrationTest
|
|
||||||
# Make the Capybara DSL available in all integration tests
|
|
||||||
include Capybara::DSL
|
|
||||||
end
|
|
Loading…
Reference in a new issue