mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
added rubocop-rails
This commit is contained in:
parent
d26e2ae313
commit
fa45917d6f
@ -1,6 +1,8 @@
|
|||||||
|
require: rubocop-rails
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
Metrics/LineLength:
|
Layout/LineLength:
|
||||||
Max: 140
|
Max: 140
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
Max: 35
|
Max: 35
|
||||||
|
3
Gemfile
3
Gemfile
@ -39,7 +39,8 @@ group :development do
|
|||||||
gem 'rb-readline'
|
gem 'rb-readline'
|
||||||
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
|
||||||
gem 'railroady'
|
gem 'railroady'
|
||||||
gem 'rubocop', '~> 1.31.2'
|
gem 'rubocop', '~> 1.31', require: false
|
||||||
|
gem 'rubocop-rails', require: false
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
gem 'spring-watcher-listen', '~> 2.0.0'
|
gem 'spring-watcher-listen', '~> 2.0.0'
|
||||||
end
|
end
|
||||||
|
@ -370,6 +370,10 @@ GEM
|
|||||||
unicode-display_width (>= 1.4.0, < 3.0)
|
unicode-display_width (>= 1.4.0, < 3.0)
|
||||||
rubocop-ast (1.19.1)
|
rubocop-ast (1.19.1)
|
||||||
parser (>= 3.1.1.0)
|
parser (>= 3.1.1.0)
|
||||||
|
rubocop-rails (2.15.2)
|
||||||
|
activesupport (>= 4.2.0)
|
||||||
|
rack (>= 1.1)
|
||||||
|
rubocop (>= 1.7.0, < 2.0)
|
||||||
ruby-progressbar (1.10.1)
|
ruby-progressbar (1.10.1)
|
||||||
ruby-rc4 (0.1.5)
|
ruby-rc4 (0.1.5)
|
||||||
ruby-vips (2.1.4)
|
ruby-vips (2.1.4)
|
||||||
@ -541,7 +545,8 @@ DEPENDENCIES
|
|||||||
repost
|
repost
|
||||||
responders (~> 2.0)
|
responders (~> 2.0)
|
||||||
rolify
|
rolify
|
||||||
rubocop (~> 1.31.2)
|
rubocop (~> 1.31)
|
||||||
|
rubocop-rails
|
||||||
rubyXL
|
rubyXL
|
||||||
rubyzip (>= 1.3.0)
|
rubyzip (>= 1.3.0)
|
||||||
sassc (= 2.1.0)
|
sassc (= 2.1.0)
|
||||||
|
@ -38,7 +38,6 @@ class Subscriptions::CreateAsAdminTest < ActionDispatch::IntegrationTest
|
|||||||
subscription = Invoice.find(result[:id]).invoice_items.first.object
|
subscription = Invoice.find(result[:id]).invoice_items.first.object
|
||||||
assert_equal plan.id, subscription.plan_id, 'subscribed plan does not match'
|
assert_equal plan.id, subscription.plan_id, 'subscribed plan does not match'
|
||||||
|
|
||||||
|
|
||||||
# Check that the user has only one subscription
|
# Check that the user has only one subscription
|
||||||
assert_equal 1, user.subscriptions.count
|
assert_equal 1, user.subscriptions.count
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ class Subscriptions::CreateAsUserTest < ActionDispatch::IntegrationTest
|
|||||||
assert_equal Mime[:json], response.content_type
|
assert_equal Mime[:json], response.content_type
|
||||||
|
|
||||||
# Check the error was handled
|
# Check the error was handled
|
||||||
assert_match /plan is not compatible/, response.body
|
assert_match(/plan is not compatible/, response.body)
|
||||||
|
|
||||||
# Check that the user has no subscription
|
# Check that the user has no subscription
|
||||||
assert_nil @user.subscription, "user's subscription was found"
|
assert_nil @user.subscription, "user's subscription was found"
|
||||||
|
@ -4,7 +4,6 @@ require 'test_helper'
|
|||||||
|
|
||||||
module Subscriptions; end
|
module Subscriptions; end
|
||||||
|
|
||||||
|
|
||||||
class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest
|
class Subscriptions::RenewAsAdminTest < ActionDispatch::IntegrationTest
|
||||||
setup do
|
setup do
|
||||||
@admin = User.find_by(username: 'admin')
|
@admin = User.find_by(username: 'admin')
|
||||||
|
@ -104,7 +104,7 @@ class Subscriptions::RenewAsUserTest < ActionDispatch::IntegrationTest
|
|||||||
assert_equal Mime[:json], response.content_type
|
assert_equal Mime[:json], response.content_type
|
||||||
|
|
||||||
# Check the error was handled
|
# Check the error was handled
|
||||||
assert_match /Your card was declined/, response.body
|
assert_match(/Your card was declined/, response.body)
|
||||||
|
|
||||||
# Check that the user's subscription has not changed
|
# Check that the user's subscription has not changed
|
||||||
assert_equal previous_expiration, @user.subscription.expired_at.to_i, "user's subscription has changed"
|
assert_equal previous_expiration, @user.subscription.expired_at.to_i, "user's subscription has changed"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user