aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/test
Commit message (Collapse)AuthorAgeFilesLines
...
| * Do not generate default alt text in image tagsCameron Cundiff2017-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Auto-generating content from the filename of an image is not suitable alternative text; alt text that isn't fully considered can be distracting and fatiguing for screen readers users (blind, low vision, dyslexic people). - Setting a filename fallback short circuits screen reader default behavior and configuration for blank descriptions. - Setting poor defaults also creates false negatives for accessibility linting and testing software, that makes it harder to improve application accessibility. *** - After this change, if authors leave images without alt text, screen readers will fallback to default behavior for missing alt text. - Also with this change, Automated linting and testing tools will correctly generate warnings. [Fixes #30096]
* | Use 5.2 version of ActiveRecord::Migration for Active Storagebogdanvlviv2017-08-221-1/+1
| |
* | Encode Content-Disposition filenames according to RFC 2231George Claghorn2017-08-213-3/+35
| | | | | | | | Closes #30134.
* | Update regexGeorge Claghorn2017-08-201-1/+1
| |
* | Fix testsGeorge Claghorn2017-08-204-4/+4
| |
* | DRYGeorge Claghorn2017-08-202-3/+3
| |
* | Rename ActiveStorage::Filename#extname to extension_with_delimiterGeorge Claghorn2017-08-201-0/+18
| |
* | Merge pull request #30292 from maclover7/jm-ast-purgeGeorge Claghorn2017-08-171-0/+7
|\ \ | | | | | | Add missing test for Blob#purge
| * | Add missing test for Blob#purgeJon Moss2017-08-171-0/+7
| |/
* / Use nil Logger for testsJon Moss2017-08-171-1/+1
|/ | | | | | | | | | | | | | | | Makes tests much more quietly, as opposed to the enormous amount of logging that appears right now. This setting is used in AJ, as well as other frameworks. Output from test run: ``` ......................................................... Finished in 3.003355s, 18.9788 runs/s, 45.2827 assertions/s. 57 runs, 136 assertions, 0 failures, 0 errors, 0 skips ```
* Move test to its proper placeGeorge Claghorn2017-08-141-0/+0
| | | | ActiveStorage::Filename is a model, so its test case belongs in test/models.
* Run Active Storage service tests in CIGeorge Claghorn2017-08-141-0/+0
|
* Should escape regexp wildcard character `.`Koichi ITO2017-08-143-4/+4
|
* Use frozen string literal in Active StorageKoichi ITO2017-08-1245-3/+89
|
* Merge pull request #30198 from betesh/activestorage-rack-test-uploaded-fileRafael França2017-08-111-1/+7
|\ | | | | Activestorage rack test uploaded file
| * Make activestorage treat Rack::Test::UploadedFile just like ↵Isaac Betesh2017-08-111-1/+7
| | | | | | | | ActionDispatch::Http::UploadedFile
* | Merge pull request #30113 from dixpac/remove_unecessary_require_in_test_helperRafael França2017-08-111-2/+0
|\ \ | | | | | | ActiveStorage: Remove unnecessary require in test_helper
| * | Remove unecessary require in test_helperdixpac2017-08-091-2/+0
| | |
* | | Enable browser caching for blobs and variants (#30196)Anton Khamets2017-08-111-0/+15
| |/ |/|
* | Run Active Storage tests in CI (#30144)George Claghorn2017-08-104-20/+18
|/
* Merge pull request #30112 from dixpac/filter_minitest_backtraceRafael França2017-08-081-0/+4
|\ | | | | ActiveStorage:Filter out Minitest backtrace.
| * Filter out Minitest backtrace.dixpac2017-08-071-0/+4
| | | | | | | | | | Filter out Minitest backtrace while allowing backtrace from other libraries to be shown.
* | Merge pull request #30135 from ffmike/azure-storage-fix-content-typeRafael Mendonça França2017-08-081-1/+8
|\ \ | | | | | | | | | Support content_type in AzureStorageService#url
| * | Support content_type in AzureStorageService#urlMike Gunderloy2017-08-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | Add in the content_type option, which is defined as part of the generic ActiveStorage::Service class. Without this option, attempts to generate a URL for an attached file fail with "ArgumentError (unknown keyword: content_type)"
* | | ActiveStorage:Add migrations per rails engine conventions (#30111)Dino Maric2017-08-081-2/+1
|/ / | | | | | | | | | | * Add migrations per rails engine conventions * Fix failing tests
* / Extend image_tag to accept ActiveStorage Attachments and Variants (#30084)Anton Khamets2017-08-071-0/+40
|/ | | | | | | | | | | | | | | | | | * Extend image_tag to accept ActiveStorage's Attachments and Variants * Flip resolve_image_source around * Add tests for the new use-cases of image_tag * Remove the higher-level test * Update image_tag documentation * Add error states into the test suite * Re-raise polymorhic_url's NoMethodError as ArgumentError * delegate_missing_to will raise DelegationError instead of NoMethodError
* Fix ruby warningsyuuji.yaginuma2017-08-055-9/+9
| | | | | | | | | | This fixes following warnings: ``` test/models/variant_test.rb:11: warning: ambiguous first argument; put parentheses or a space even after `/' operator lib/active_storage/attached/macros.rb:63: warning: instance variable @active_storage_attached_highlights not initialized lib/active_storage/attached/macros.rb:25: warning: instance variable @active_storage_attached_avatar not initialized ```
* Rename Azure to AzureStorage (#30057)Dino Maric2017-08-043-5/+5
|
* Fix tests for AWS buckets that include a . (#30059)Claudio B2017-08-042-3/+7
| | | | | | | | | If an AWS bucket name includes a `.` (e.g. `bucket.name`), then the canonical URL for an object will start with "https://s3.amazonaws.com/bucket.name/" and not with "https://bucket.name.s3.amazonaws.com/". The URL tests have now been separated into two separate asserts, to ensure that both the "s3.amazonaws.com" and the "bucket.name" components are included, but not specifically in that order.
* Make Rubocop happier about ActiveStorageclaudiob2017-08-031-1/+1
| | | | | | | | | | | | Running `rubocop activestorage` before this commit resulted in 20 offenses. This commit only fixes: - Trailing whitespace detected - Space inside } missing - Put one space between the method name and the first argument. The other offenses are left since they are intentional according to @georgeclaghorn (https://github.com/rails/rails/pull/30061#issuecomment-319999190)
* Fix `Style/StringLiterals` violations for Active StorageRyuta Kamizono2017-08-0315-25/+25
| | | | | | | | | | | | ``` % be rubocop -a --only Style/StringLiterals activestorage Inspecting 74 files ........................................CCCCCCCCCC.C........CC.......C.C.. (snip) 74 files inspected, 31 offenses detected, 31 offenses corrected ```
* Skip if credentials aren't providedDavid Heinemeier Hansson2017-08-012-2/+2
|
* Fix dummy app for inclusion in RailsDavid Heinemeier Hansson2017-08-011-2/+1
|
* Merge pull request #30030 from claudiob/only-diskGuillermo Iguaran2017-08-011-1/+3
|\ | | | | Let ActiveStorage tests pass only for Disk
| * Let ActiveStorage tests pass only for Diskclaudiob2017-08-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you have a "service/configurations.yml" file, but every single line is commented out, then an error occurs when running tests: ``` git:active-storage-import~/code/rails/activestorage$ rake ~/code/rails/activestorage/test/test_helper.rb:17:in `<top (required)>': undefined method `deep_symbolize_keys' for false:FalseClass (NoMethodError) from ~/code/rails/activestorage/test/controllers/direct_uploads_controller_test.rb:1:in `require' ``` The reason is that `YAML.load(..an empty file content..)` simply returns `false`, and not `{}`. This PR fixes this behavior so tests can also run when no remote service is available.
* | Don't depend on HTTPartyclaudiob2017-08-013-15/+18
|/ | | | | | | "httparty" is only added in #30020 to write two tests to make PUT requests against S3 and GCS. The same requests can be made with net/http, removing a dependency from the Gemfile.
* Setup travis to be able to run CI tests against S3David Heinemeier Hansson2017-07-314-33/+31
|
* Move to new storage.yml locationDavid Heinemeier Hansson2017-07-311-0/+0
|
* Add 'activestorage/' from commit '3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58'Rafael Mendonça França2017-07-3165-0/+1424
git-subtree-dir: activestorage git-subtree-mainline: 0d58e7e478e79c2d6b2a39a4444d2a17a903b2a6 git-subtree-split: 3f4a7218a4a4923a0e7ce1b2eb0d2888ce30da58