mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 09:19:15 -04:00
Compare commits
38 Commits
feature/po
...
release65
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8c93f16db | ||
|
|
8006d26c6e | ||
|
|
2766082696 | ||
|
|
d887d5c788 | ||
|
|
0634719afc | ||
|
|
a13cf93aeb | ||
|
|
04376f15a2 | ||
|
|
82d3f84e0c | ||
|
|
4f705ff37b | ||
|
|
4829d5513c | ||
|
|
d1419aaca4 | ||
|
|
2458afc451 | ||
|
|
278be7067f | ||
|
|
bc71c4a706 | ||
|
|
b1a42a2ed6 | ||
|
|
fe22c92a63 | ||
|
|
f00b31cf46 | ||
|
|
7cfee1d89c | ||
|
|
6c89cef5bc | ||
|
|
5d79aa3e60 | ||
|
|
29c8d87703 | ||
|
|
83ef779c11 | ||
|
|
4ada3e1585 | ||
|
|
fa6752c668 | ||
|
|
f9186c1a8a | ||
|
|
82dcd1d86c | ||
|
|
b2146e791f | ||
|
|
a9c33a30d2 | ||
|
|
497cb6627d | ||
|
|
a8a96ae125 | ||
|
|
4dcafdb117 | ||
|
|
bd132c32fa | ||
|
|
2b5ed05628 | ||
|
|
df9f8445ad | ||
|
|
3bfa1af67b | ||
|
|
e5e0aacfeb | ||
|
|
962cf0bca7 | ||
|
|
419ee298ff |
@@ -1,47 +0,0 @@
|
||||
plugins:
|
||||
brakeman:
|
||||
enabled: false # codeclimate's brakeman is stuck in rails 5 rules
|
||||
bundler-audit:
|
||||
enabled: true
|
||||
coffeelint:
|
||||
enabled: true
|
||||
duplication:
|
||||
enabled: true
|
||||
config:
|
||||
languages:
|
||||
- ruby
|
||||
- javascript
|
||||
editorconfig:
|
||||
enabled: true
|
||||
eslint:
|
||||
enabled: true
|
||||
fixme:
|
||||
enabled: true
|
||||
haml-lint:
|
||||
enabled: true
|
||||
nodesecurity:
|
||||
enabled: true
|
||||
rubocop:
|
||||
enabled: true
|
||||
channel: "rubocop-1-11"
|
||||
scss-lint:
|
||||
enabled: true
|
||||
shellcheck:
|
||||
enabled: true
|
||||
ratings:
|
||||
paths:
|
||||
- "**.rb"
|
||||
- "**.ru"
|
||||
- "**.js"
|
||||
- "**.coffee"
|
||||
- "**.scss"
|
||||
- "**.haml"
|
||||
- Gemfile.lock
|
||||
exclude_paths:
|
||||
- config/
|
||||
- db/
|
||||
- spec/
|
||||
- public/
|
||||
- app/assets/stylesheets/bootstrap-accessibility.css
|
||||
- app/assets/javascripts/bootstrap*
|
||||
- app/assets/stylesheets/leaflet_overrides.scss
|
||||
7
.github/workflows/ci-features.yml
vendored
7
.github/workflows/ci-features.yml
vendored
@@ -117,9 +117,4 @@ jobs:
|
||||
run: bundle exec rspec spec/features/posts/ -fd
|
||||
|
||||
- name: Run rspec (rss/)
|
||||
run: bundle exec rspec spec/features/rss/ -fd
|
||||
|
||||
- name: Report to code climate
|
||||
run: |
|
||||
gem install codeclimate-test-reporter
|
||||
codeclimate-test-reporter
|
||||
run: bundle exec rspec spec/features/rss/ -fd
|
||||
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@@ -127,9 +127,4 @@ jobs:
|
||||
run: bundle exec rspec spec/routing/ -fd --fail-fast
|
||||
|
||||
- name: Run rspec (request)
|
||||
run: bundle exec rspec spec/requests/ -fd --fail-fast
|
||||
|
||||
- name: Report to code climate
|
||||
run: |
|
||||
gem install codeclimate-test-reporter
|
||||
codeclimate-test-reporter
|
||||
run: bundle exec rspec spec/requests/ -fd --fail-fast
|
||||
@@ -1 +1 @@
|
||||
3.3.7
|
||||
3.3.8
|
||||
|
||||
2
Gemfile
2
Gemfile
@@ -175,6 +175,7 @@ group :development, :test do
|
||||
gem 'rubocop-rspec_rails'
|
||||
gem 'webrat' # provides HTML matchers for view tests
|
||||
|
||||
gem 'crowdin-cli' # for translations
|
||||
gem 'dotenv-rails'
|
||||
|
||||
# cli utils
|
||||
@@ -188,7 +189,6 @@ end
|
||||
group :test do
|
||||
gem 'axe-core-capybara'
|
||||
gem 'axe-core-rspec'
|
||||
gem 'codeclimate-test-reporter', require: false
|
||||
gem 'rails-controller-testing'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'timecop'
|
||||
|
||||
112
Gemfile.lock
112
Gemfile.lock
@@ -135,14 +135,14 @@ GEM
|
||||
descendants_tracker (~> 0.0.4)
|
||||
ice_nine (~> 0.11.0)
|
||||
thread_safe (~> 0.3, >= 0.3.1)
|
||||
base64 (0.2.0)
|
||||
base64 (0.3.0)
|
||||
bcrypt (3.1.20)
|
||||
benchmark (0.4.0)
|
||||
benchmark (0.4.1)
|
||||
better_errors (2.10.1)
|
||||
erubi (>= 1.0.0)
|
||||
rack (>= 0.9.0)
|
||||
rouge (>= 1.0.0)
|
||||
bigdecimal (3.1.9)
|
||||
bigdecimal (3.2.2)
|
||||
bluecloth (2.2.0)
|
||||
bonsai-elasticsearch-rails (7.0.1)
|
||||
elasticsearch-model (< 8)
|
||||
@@ -185,8 +185,6 @@ GEM
|
||||
ssrf_filter (~> 1.0)
|
||||
chartkick (5.1.5)
|
||||
childprocess (5.0.0)
|
||||
codeclimate-test-reporter (1.0.9)
|
||||
simplecov (<= 0.13)
|
||||
coderay (1.1.3)
|
||||
coercible (1.0.0)
|
||||
descendants_tracker (~> 0.0.1)
|
||||
@@ -202,6 +200,14 @@ GEM
|
||||
concurrent-ruby (1.3.5)
|
||||
connection_pool (2.5.3)
|
||||
crass (1.0.6)
|
||||
crowdin-api (1.12.0)
|
||||
open-uri (>= 0.1.0, < 0.2.0)
|
||||
rest-client (>= 2.0.0, < 2.2.0)
|
||||
crowdin-cli (0.2.2)
|
||||
crowdin-api (>= 0.2.0)
|
||||
gli (>= 2.7.0)
|
||||
i18n (>= 0.6.4)
|
||||
rubyzip (>= 1.0.0)
|
||||
csv (3.3.1)
|
||||
csv_shaper (1.4.0)
|
||||
activesupport (>= 3.0.0)
|
||||
@@ -222,15 +228,15 @@ GEM
|
||||
railties (>= 4.1.0)
|
||||
responders
|
||||
warden (~> 1.2.3)
|
||||
diff-lcs (1.6.1)
|
||||
diff-lcs (1.6.2)
|
||||
discard (1.4.0)
|
||||
activerecord (>= 4.2, < 9.0)
|
||||
docile (1.1.5)
|
||||
domain_name (0.6.20240107)
|
||||
dotenv (3.1.8)
|
||||
dotenv-rails (3.1.8)
|
||||
dotenv (= 3.1.8)
|
||||
railties (>= 6.1)
|
||||
drb (2.2.1)
|
||||
drb (2.2.3)
|
||||
dumb_delegator (1.1.0)
|
||||
elasticsearch (7.0.0)
|
||||
elasticsearch-api (= 7.0.0)
|
||||
@@ -245,23 +251,24 @@ GEM
|
||||
elasticsearch-transport (7.0.0)
|
||||
faraday
|
||||
multi_json
|
||||
erb (5.0.1)
|
||||
erubi (1.13.1)
|
||||
erubis (2.7.0)
|
||||
excon (1.2.5)
|
||||
logger
|
||||
execjs (2.10.0)
|
||||
factory_bot (6.5.0)
|
||||
activesupport (>= 5.0.0)
|
||||
factory_bot_rails (6.4.4)
|
||||
factory_bot (6.5.4)
|
||||
activesupport (>= 6.1.0)
|
||||
factory_bot_rails (6.5.0)
|
||||
factory_bot (~> 6.5)
|
||||
railties (>= 5.0.0)
|
||||
railties (>= 6.1.0)
|
||||
faker (3.5.1)
|
||||
i18n (>= 1.8.11, < 2)
|
||||
faraday (2.13.1)
|
||||
faraday (2.13.2)
|
||||
faraday-net_http (>= 2.0, < 3.5)
|
||||
json
|
||||
logger
|
||||
faraday-net_http (3.4.0)
|
||||
faraday-net_http (3.4.1)
|
||||
net-http (>= 0.5.0)
|
||||
ffi (1.16.3)
|
||||
flickraw (0.9.10)
|
||||
@@ -276,6 +283,8 @@ GEM
|
||||
gibbon (1.2.1)
|
||||
httparty
|
||||
multi_json (>= 1.9.0)
|
||||
gli (2.22.2)
|
||||
ostruct
|
||||
globalid (1.2.1)
|
||||
activesupport (>= 6.1)
|
||||
gravatar-ultimate (2.0.0)
|
||||
@@ -296,7 +305,7 @@ GEM
|
||||
activesupport (>= 5.1)
|
||||
haml (>= 4.0.6)
|
||||
railties (>= 5.1)
|
||||
haml_lint (0.62.0)
|
||||
haml_lint (0.66.0)
|
||||
haml (>= 5.0)
|
||||
parallel (~> 1.10)
|
||||
rainbow
|
||||
@@ -312,6 +321,9 @@ GEM
|
||||
webrick
|
||||
highline (3.1.2)
|
||||
reline
|
||||
http-accept (1.7.0)
|
||||
http-cookie (1.0.8)
|
||||
domain_name (~> 0.5)
|
||||
httparty (0.22.0)
|
||||
csv
|
||||
mini_mime (>= 1.0.0)
|
||||
@@ -329,7 +341,7 @@ GEM
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
ruby-progressbar (~> 1.8, >= 1.8.1)
|
||||
terminal-table (>= 1.5.1)
|
||||
icalendar (2.11.0)
|
||||
icalendar (2.11.2)
|
||||
base64
|
||||
ice_cube (~> 0.16)
|
||||
logger
|
||||
@@ -348,7 +360,7 @@ GEM
|
||||
rails-dom-testing (>= 1, < 3)
|
||||
railties (>= 4.2.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
json (2.12.0)
|
||||
json (2.13.2)
|
||||
json-schema (5.1.0)
|
||||
addressable (~> 2.8)
|
||||
jsonapi-resources (0.10.7)
|
||||
@@ -393,6 +405,10 @@ GEM
|
||||
matrix (0.4.2)
|
||||
memcachier (0.0.2)
|
||||
method_source (1.1.0)
|
||||
mime-types (3.7.0)
|
||||
logger
|
||||
mime-types-data (~> 3.2025, >= 3.2025.0507)
|
||||
mime-types-data (3.2025.0805)
|
||||
mimemagic (0.4.3)
|
||||
nokogiri (~> 1)
|
||||
rake
|
||||
@@ -416,11 +432,12 @@ GEM
|
||||
timeout
|
||||
net-smtp (0.5.0)
|
||||
net-protocol
|
||||
netrc (0.11.0)
|
||||
nio4r (2.7.4)
|
||||
nokogiri (1.18.8)
|
||||
nokogiri (1.18.9)
|
||||
mini_portile2 (~> 2.8.2)
|
||||
racc (~> 1.4)
|
||||
nokogiri (1.18.8-x86_64-linux-gnu)
|
||||
nokogiri (1.18.9-x86_64-linux-gnu)
|
||||
racc (~> 1.4)
|
||||
oauth (0.5.6)
|
||||
oj (3.16.10)
|
||||
@@ -438,15 +455,17 @@ GEM
|
||||
omniauth-twitter (1.4.0)
|
||||
omniauth-oauth (~> 1.1)
|
||||
rack
|
||||
open-uri (0.1.0)
|
||||
orm_adapter (0.5.0)
|
||||
ostruct (0.6.1)
|
||||
ostruct (0.6.2)
|
||||
parallel (1.27.0)
|
||||
parser (3.3.8.0)
|
||||
parser (3.3.9.0)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
percy-capybara (5.0.0)
|
||||
capybara (>= 3)
|
||||
pg (1.5.9)
|
||||
pg (1.6.1)
|
||||
pg (1.6.1-x86_64-linux)
|
||||
platform-api (3.8.0)
|
||||
heroics (~> 0.1.1)
|
||||
moneta (~> 1.0.0)
|
||||
@@ -467,7 +486,7 @@ GEM
|
||||
nio4r (~> 2.0)
|
||||
query_diet (0.7.2)
|
||||
racc (1.8.1)
|
||||
rack (2.2.15)
|
||||
rack (2.2.17)
|
||||
rack-cors (2.0.2)
|
||||
rack (>= 2.0.0)
|
||||
rack-protection (3.2.0)
|
||||
@@ -498,7 +517,7 @@ GEM
|
||||
actionpack (>= 5.0.1.rc1)
|
||||
actionview (>= 5.0.1.rc1)
|
||||
activesupport (>= 5.0.1.rc1)
|
||||
rails-dom-testing (2.2.0)
|
||||
rails-dom-testing (2.3.0)
|
||||
activesupport (>= 5.0.0)
|
||||
minitest
|
||||
nokogiri (>= 1.6)
|
||||
@@ -528,17 +547,23 @@ GEM
|
||||
rb-fsevent (0.11.2)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rdoc (6.13.1)
|
||||
rdoc (6.14.2)
|
||||
erb
|
||||
psych (>= 4.0.0)
|
||||
recaptcha (5.19.0)
|
||||
redis-client (0.23.2)
|
||||
connection_pool
|
||||
regexp_parser (2.10.0)
|
||||
regexp_parser (2.11.0)
|
||||
reline (0.6.1)
|
||||
io-console (~> 0.5)
|
||||
responders (3.1.1)
|
||||
actionpack (>= 5.2)
|
||||
railties (>= 5.2)
|
||||
rest-client (2.1.0)
|
||||
http-accept (>= 1.7.0, < 2.0)
|
||||
http-cookie (>= 1.0.2, < 2.0)
|
||||
mime-types (>= 1.16, < 4.0)
|
||||
netrc (~> 0.8)
|
||||
rexml (3.4.1)
|
||||
rouge (4.1.2)
|
||||
rspec (3.13.0)
|
||||
@@ -549,15 +574,15 @@ GEM
|
||||
activemodel (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
rspec-mocks (>= 2.99, < 4.0)
|
||||
rspec-core (3.13.3)
|
||||
rspec-core (3.13.5)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-expectations (3.13.4)
|
||||
rspec-expectations (3.13.5)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-mocks (3.13.4)
|
||||
rspec-mocks (3.13.5)
|
||||
diff-lcs (>= 1.2.0, < 2.0)
|
||||
rspec-support (~> 3.13.0)
|
||||
rspec-rails (8.0.0)
|
||||
rspec-rails (8.0.1)
|
||||
actionpack (>= 7.2)
|
||||
activesupport (>= 7.2)
|
||||
railties (>= 7.2)
|
||||
@@ -565,7 +590,7 @@ GEM
|
||||
rspec-expectations (~> 3.13)
|
||||
rspec-mocks (~> 3.13)
|
||||
rspec-support (~> 3.13)
|
||||
rspec-support (3.13.3)
|
||||
rspec-support (3.13.4)
|
||||
rspectre (0.2.0)
|
||||
parser (>= 3.3.7.1)
|
||||
prism (~> 1.3)
|
||||
@@ -581,7 +606,7 @@ GEM
|
||||
rswag-ui (2.16.0)
|
||||
actionpack (>= 5.2, < 8.1)
|
||||
railties (>= 5.2, < 8.1)
|
||||
rubocop (1.75.5)
|
||||
rubocop (1.79.1)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
lint_roller (~> 1.1.0)
|
||||
@@ -589,10 +614,10 @@ GEM
|
||||
parser (>= 3.3.0.2)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 2.9.3, < 3.0)
|
||||
rubocop-ast (>= 1.44.0, < 2.0)
|
||||
rubocop-ast (>= 1.46.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 2.4.0, < 4.0)
|
||||
rubocop-ast (1.44.1)
|
||||
rubocop-ast (1.46.0)
|
||||
parser (>= 3.3.7.2)
|
||||
prism (~> 1.4)
|
||||
rubocop-capybara (2.22.1)
|
||||
@@ -641,7 +666,7 @@ GEM
|
||||
activemodel (>= 6.1)
|
||||
hashie
|
||||
securerandom (0.4.1)
|
||||
selenium-webdriver (4.32.0)
|
||||
selenium-webdriver (4.34.0)
|
||||
base64 (~> 0.2)
|
||||
logger (~> 1.4)
|
||||
rexml (~> 3.2, >= 3.2.5)
|
||||
@@ -653,11 +678,6 @@ GEM
|
||||
logger
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.22.2)
|
||||
simplecov (0.13.0)
|
||||
docile (~> 1.1.0)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
sprockets (3.7.5)
|
||||
base64
|
||||
concurrent-ruby (~> 1.0)
|
||||
@@ -669,14 +689,14 @@ GEM
|
||||
ssrf_filter (1.1.2)
|
||||
stringio (3.1.7)
|
||||
sysexits (1.2.0)
|
||||
temple (0.10.3)
|
||||
temple (0.10.4)
|
||||
terminal-table (4.0.0)
|
||||
unicode-display_width (>= 1.1.1, < 4)
|
||||
terser (1.2.5)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
thor (1.3.2)
|
||||
thor (1.4.0)
|
||||
thread_safe (0.3.6)
|
||||
tilt (2.6.0)
|
||||
tilt (2.6.1)
|
||||
timecop (0.9.10)
|
||||
timeout (0.4.3)
|
||||
trollop (1.16.2)
|
||||
@@ -718,7 +738,7 @@ GEM
|
||||
webrick
|
||||
xpath (3.2.0)
|
||||
nokogiri (~> 1.8)
|
||||
zeitwerk (2.7.2)
|
||||
zeitwerk (2.7.3)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
@@ -744,9 +764,9 @@ DEPENDENCIES
|
||||
capybara-email
|
||||
capybara-screenshot
|
||||
chartkick
|
||||
codeclimate-test-reporter
|
||||
coffee-rails
|
||||
comfortable_mexican_sofa!
|
||||
crowdin-cli
|
||||
csv_shaper
|
||||
dalli
|
||||
database_cleaner
|
||||
@@ -834,7 +854,7 @@ DEPENDENCIES
|
||||
xmlrpc
|
||||
|
||||
RUBY VERSION
|
||||
ruby 3.3.7p123
|
||||
ruby 3.3.8p144
|
||||
|
||||
BUNDLED WITH
|
||||
2.4.22
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# 🌱 Growstuff
|
||||
|
||||

|
||||
[](https://codeclimate.com/github/Growstuff/growstuff)
|
||||
|
||||
Welcome to the Growstuff project.
|
||||
|
||||
|
||||
22
crowdin.yml
Normal file
22
crowdin.yml
Normal file
@@ -0,0 +1,22 @@
|
||||
# Hi there!
|
||||
#
|
||||
# This is a configuration file for the Crowdin CLI.
|
||||
# You'll need to replace the placeholder project_id with your actual
|
||||
# project ID from CrowdIn.
|
||||
#
|
||||
# For more information, see the Crowdin CLI documentation:
|
||||
# https://support.crowdin.com/enterprise/cli-v3/
|
||||
#
|
||||
project_id: "your-project-id"
|
||||
api_token_env: "CROWDIN_API_TOKEN"
|
||||
base_path: "."
|
||||
|
||||
files:
|
||||
- source: '/config/locales/en.yml'
|
||||
translation: '/config/locales/%two_letters_code%.yml'
|
||||
# The 'ignore' property is used to exclude files from processing.
|
||||
# We are ignoring the existing Japanese translation file.
|
||||
ignore:
|
||||
- '/config/locales/ja.yml'
|
||||
- source: '/config/locales/*.en.yml'
|
||||
translation: '/config/locales/%file_name%.%two_letters_code%.yml'
|
||||
@@ -8,4 +8,13 @@ namespace :openfarm do
|
||||
Rails.logger = Logger.new(STDOUT)
|
||||
OpenfarmService.new.import!
|
||||
end
|
||||
|
||||
desc "Delete all pictures with source OpenFarm"
|
||||
task delete_pictures: :environment do
|
||||
puts "Deleting pictures with source OpenFarm..."
|
||||
photos_to_delete = Photo.where(source: 'openfarm')
|
||||
count = photos_to_delete.count
|
||||
photos_to_delete.destroy_all
|
||||
puts "Deleted #{count} pictures."
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,11 +2,6 @@
|
||||
|
||||
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
require 'simplecov'
|
||||
|
||||
# output coverage locally AND send it to coveralls
|
||||
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter])
|
||||
|
||||
require 'spec_helper'
|
||||
require File.expand_path('../config/environment', __dir__)
|
||||
require 'rspec/rails'
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
# users commonly want.
|
||||
#
|
||||
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
||||
require 'simplecov'
|
||||
require 'percy/capybara'
|
||||
require 'vcr'
|
||||
|
||||
@@ -27,8 +26,6 @@ VCR.configure do |c|
|
||||
c.configure_rspec_metadata!
|
||||
end
|
||||
|
||||
SimpleCov.start
|
||||
|
||||
RSpec.configure do |config|
|
||||
# rspec-expectations config goes here. You can use an alternate
|
||||
# assertion/expectation library such as wrong or the stdlib/minitest
|
||||
|
||||
33
spec/tasks/openfarm_rake_spec.rb
Normal file
33
spec/tasks/openfarm_rake_spec.rb
Normal file
@@ -0,0 +1,33 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
require 'rake'
|
||||
|
||||
describe 'openfarm:delete_pictures' do
|
||||
before(:all) do
|
||||
Rails.application.load_tasks
|
||||
end
|
||||
|
||||
# We need to do this because Rake tasks normally output to STDOUT, but we
|
||||
# don't want to clutter up the test output.
|
||||
before(:each) do
|
||||
$stdout = StringIO.new
|
||||
end
|
||||
|
||||
after(:each) do
|
||||
$stdout = STDOUT
|
||||
end
|
||||
|
||||
it 'deletes pictures with source OpenFarm' do
|
||||
create(:photo, source: 'OpenFarm')
|
||||
create(:photo, source: 'flickr')
|
||||
|
||||
expect(Photo.where(source: 'OpenFarm').count).to eq(1)
|
||||
expect(Photo.where(source: 'flickr').count).to eq(1)
|
||||
|
||||
Rake::Task['openfarm:delete_pictures'].invoke
|
||||
|
||||
expect(Photo.where(source: 'OpenFarm').count).to eq(0)
|
||||
expect(Photo.where(source: 'flickr').count).to eq(1)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user