From 5045ec81739c80fd2619d46d0cf1493660c05b5d Mon Sep 17 00:00:00 2001 From: f Date: Mon, 29 Jul 2019 15:28:09 -0300 Subject: [PATCH] no vamos a testear esto por ahora --- test/models/post_test.rb | 44 ------------------------------------- test/models/usuaria_test.rb | 20 ----------------- 2 files changed, 64 deletions(-) delete mode 100644 test/models/post_test.rb delete mode 100644 test/models/usuaria_test.rb diff --git a/test/models/post_test.rb b/test/models/post_test.rb deleted file mode 100644 index de1a7ae..0000000 --- a/test/models/post_test.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class PostTest < ActiveSupport::TestCase - setup do - @user = Usuaria.find('f@kefir.red') - @site = @user.sites.select { |s| s.name == 'cyber-women.com' }.first - @post = @site.posts.sample - end - - test 'El post no es nuevo si ya existe' do - assert_not @post.new? - end - - test 'El post está traducido' do - assert @post.translated? - end - - test 'El post tiene un título' do - assert String, @post.title.class - end - - test 'El post tiene una fecha' do - assert DateTime, @post.date.class - end - - test 'Es obvio que un post recién cargado es válido' do - assert @post.valid? - end - - test 'El post se puede borrar' do - path = @post.path - - assert @post.destroy - assert_not File.exist?(path) - - post = @site.posts_for(@post.collection).find do |p| - p.path == @post.path - end - - assert_not post - end -end diff --git a/test/models/usuaria_test.rb b/test/models/usuaria_test.rb deleted file mode 100644 index 1bff620..0000000 --- a/test/models/usuaria_test.rb +++ /dev/null @@ -1,20 +0,0 @@ -# frozen_string_literal: true - -require 'test_helper' - -class UsuariaTest < ActiveSupport::TestCase - setup do - @mail = 'f@kefir.red' - @usuaria = Usuaria.find(@mail) - end - - test 'La usuaria puede encontrarse por su mail' do - assert_equal @mail, @usuaria.username - end - - test 'La usuaria tiene sitios' do - @usuaria.sites.each do |s| - assert_equal Site, s.class - end - end -end