Commit Graph

44 Commits

Author SHA1 Message Date
evazion
f8ed7d4357 tests: fix HTTP requests failing due to webmock (#3039).
Fixes failures in source tests caused by Webmock disabling non-stubbed
HTTP requests by default.

https://github.com/bblimke/webmock#real-requests-to-network-can-be-allowed-or-disabled
2017-07-01 12:22:36 -05:00
r888888888
d7690d24b0 fixes #3039 2017-06-29 16:05:01 -07:00
evazion
5684ba3b1d tests: factor out assert_downloaded to DownloadTestHelper. 2017-06-21 21:10:07 -05:00
evazion
a844a1daf4 posts: fix expunging posts not deleting files.
Fix expungement to ignore the "file still in use" check.
2017-06-14 21:31:24 -05:00
evazion
c0e5c400a7 tests: fix tests for Rails.cache. 2017-04-16 16:48:36 -05:00
r888888888
6bd03ee4db fix tests 2017-02-21 15:04:55 -08:00
Albert Yi
5404c1d231 implement postarchive 2017-02-21 13:40:52 -08:00
evazion
e26fb61ee9 tests: add explore/posts controller tests. 2017-02-06 18:48:36 -06:00
evazion
8c75f74ca5 tests: update simplecov config. 2017-02-04 22:17:39 -06:00
evazion
e8cf417e9c tests: update gems to latest versions.
Also fix a few things that broke under shoulda-matchers 3.1.1.
2017-02-04 22:17:15 -06:00
evazion
dd5974bf8c test_helper.rb: use MemcacheMock. 2017-02-04 17:18:52 -06:00
evazion
9b16c45edc test_helper.rb: factor out upload test helpers. 2017-02-04 17:18:52 -06:00
evazion
1511118bba test_helper.rb: remove unused assert_authentication_* helpers. 2017-02-04 17:18:51 -06:00
evazion
beddc34958 tests: set Delayed::Worker.delay_jobs = false globally. 2017-02-04 17:18:51 -06:00
Albert Yi
0ea7d78584 remove usage of vcr cassettes; delete unused fixtures; fix some broken unit tests 2016-12-28 15:47:28 -08:00
r888888888
fc7afd44ea refactor source pixiv test
refactor pixiv download tests
refactor upload test
refactor nico seiga test
refactor twitter tests
2016-09-28 11:25:29 -07:00
r888888888
58aa5c6d66 fix tests 2016-05-28 14:08:44 -07:00
r888888888
66dd4f072e update tests 2015-06-02 19:20:48 -07:00
r888888888
c92c32ecda fix tests 2015-02-15 12:23:53 -08:00
r888888888
6233bfd40e fix tests 2015-02-10 18:37:23 -08:00
r888888888
ace7e6abff fix warnings 2014-12-10 16:23:58 -08:00
evazion
57bb51621e Add debugger gem.
Fix random VCR failures in Pixiv tests.

Sometimes tests randomly fail because the PHPSESSID they use in their
HTTP requests to Pixiv is different than the one that was originally
recorded by VCR. This causes VCR to complain that the requests don't
match.

This is caused by the PHPSESSID being globally cached in Memcache.
Depending on the order the tests run in (which is random), one set of
tests can use a PHPSESSID that was recorded for a /different/ set of
tests.

Improve Pixiv URL matching.

* Allow URLs that are missing the http:// part. These are sometimes seen
  in artist entries.
* Ignore URLs from random Pixiv domains such as dic.pixiv.net,
  blog.pixiv.net, etc. These are also sometimes in artist entries.

Improve normalize_for_artist_finder! URL matching.

* Normalize www.pixiv.net/stacc/username URLs.
* Correctly normalize URLs that are missing the illust ID part on the end
  (i.e. http://i2.pixiv.net/img04/img/syounen_no_uta/). These are common
  in artist entries.

Match URLs strictly when normalizing for artist entries.

Only normalize Pixiv URLs that strictly match a known format. Pass any
unrecognized URLs through without attempting to normalize them, just to
be safe.

Normalize URLs when saving artist entries.
2014-12-03 13:16:05 -08:00
r888888888
177ef0ebcc fixes #2307 2014-11-19 17:17:26 -08:00
evazion
268f79c3d9 Make VCR disallow unexpected HTTP requests.
This makes it so that tests fail when they make HTTP requests they
aren't expected to. Update these tests so that they use VCR like they
should.
2014-10-04 12:45:37 -05:00
r888888888
60d3bcf251 update version 2013-06-05 15:37:33 -07:00
r888888888
4dff618863 Use webmock instead of fakeweb for VCR; Fix tests; Use Timecop to speed up tests previously using sleep; Move artist rename into seperate operation 2013-05-24 12:59:13 -07:00
r888888888
5547f0937a switch vcr web backend to fakeweb, add vcr support for nico seiga tests 2013-05-03 16:24:10 -07:00
r888888888
850270dafa add vcr cassettes for pixiv tests 2013-04-30 17:35:24 -07:00
albert
2ac22d07cd implement api limiting 2013-03-20 16:35:35 -07:00
小太
cba839ba76 Kill trailing whitespace in ruby files 2013-03-19 23:10:10 +11:00
albert
b030cbf6ac upgraded to rails 3.2.1 2012-01-27 17:15:46 -05:00
Robin Liao
0690733247 Mocking out a fake Memcached so we can run our tests without a running memcache server 2011-09-03 04:38:07 -07:00
albert
ebee1eb665 fixed upload tests 2011-08-23 18:33:27 -04:00
albert
f48000a8b5 got rid of removedpost, restore classic is_deleted mechanics 2011-02-12 17:37:48 -05:00
albert
46164eab4f finished dmails and favorites functional tests 2010-12-05 22:27:45 -05:00
albert
484ff696e2 fixed jrails, fixed deprecation warnings 2010-10-27 13:40:50 -04:00
albert
5610731b35 sync 2010-08-18 18:42:33 -04:00
albert
06a959a9fd fixed test:units rake task 2010-03-18 18:29:41 -04:00
albert
9eb578927c added limit methods to user, more work on post views 2010-03-12 15:18:30 -05:00
albert
15c134b270 work on controllers/views started 2010-03-11 19:42:04 -05:00
albert
ac98d7db37 stubbed in blank controllers/helpers/functional tests 2010-03-10 18:21:43 -05:00
albert
9c441aff4c added resizer 2010-02-08 01:40:39 -05:00
Albert Yi
3bfae1f0db added user test, basic user methods 2010-02-06 16:48:40 -05:00
Albert Yi
9bb07046cd initial 2010-02-04 15:08:49 -05:00