Original Email: https://www.youtube.com/watch?v=Az49aNuYeJs
sb@strongbadia.usa | Strong Bad | email #: 118
Expected: Emails can be deleted, even if they are one of those virus ones
<!DOCTYPE html> | |
<!-- code/comments not formatted for word wrap --> | |
<html> | |
<head> | |
<!-- Display the KSA favicon --> | |
<link rel="shortcut icon" href="/images/KSA/favicon.ico" type="image/x-icon" /> |
Original Email: https://www.youtube.com/watch?v=Az49aNuYeJs
sb@strongbadia.usa | Strong Bad | email #: 118
Expected: Emails can be deleted, even if they are one of those virus ones
# Some very helpful asserts to add on top of MiniTest, includes ordered array | |
# and set comparison, ActiveRecord attribute validation, and layout assertions | |
# This was originally written by @madrobby for Freckle: https://letsfreckle.com | |
module MiniTest | |
module Assertions | |
def assert_layout(layout, message=nil) | |
assert_equal "layouts/#{layout}", @response.layout, message | |
end |
# fixes nested describes in controller tests | |
# this is a Rails bug apparently fixed in newer Rails versions | |
# https://github.com/rails/rails/issues/7743 | |
# This was originally written by @madrobby for Freckle: https://letsfreckle.com | |
class ActionController::TestCase | |
def self.determine_default_controller_class(name) | |
name.split('::').reverse.map { |n| | |
safe_constantize(n.sub(/Test$/, '')) | |
}.compact.first |
# Deprecation warnings for common test-spec helpers, useful when porting tests | |
# to MiniTest by showing you what to replace it with. | |
# This was originally written by @madrobby for Freckle: https://letsfreckle.com | |
# remember to replace `YourApp` with the namespace of your app. | |
module YourApp::Assertions | |
mattr_accessor :deprecation_warnings | |
@@deprecation_warnings = [] | |
class SpecResponder |
# Port of test-spec's `add_allow_switch` to MiniTest. | |
# This was originally written by @madrobby for Freckle: https://letsfreckle.com | |
# Make sure to rename `YourApp` to the namespace of your app. | |
module YourApp | |
class AddAllowSwitchCalledTwiceError < StandardError | |
# By overriding this method, we can provide a sort of default exception message | |
def self.exception(message) | |
super("Called add_allow_switch(#{message}) twice! Make sure you don't require your test helper twice.") | |
end |
# include this in your test_helper.rb. It monkeypatches | |
# The methods used to actually run any performance tests | |
# subclassed from ActionController::PerformanceTest | |
# based on: https://github.com/rails/rails/blob/3-2-stable/activesupport/lib/active_support/testing/performance.rb#L44 | |
module ActiveSupport | |
module Testing | |
module Performance | |
def run(runner) |
source 'https://rubygems.org' | |
gem 'sinatra' | |
gem 'sinatra-contrib' | |
gem 'debugger', :require => false | |
gem 'mysql' | |
gem 'dbd-mysql' | |
gem 'dbi' |
{ | |
"message": "you don't have permission to filter by imports", | |
"errors": [ | |
{ | |
"resource": "Entry", | |
"code": "insufficent_permissions", | |
"field": "import_ids" | |
} | |
] | |
} |