Sha256: 62d6fde5c0cbab61f38c9f051a751a5b5bfb44652350f220b308c095c75f42f0
Contents?: true
Size: 626 Bytes
Versions: 11
Compression:
Stored size: 626 Bytes
Contents
u = up.util $ = jQuery beforeEach -> jasmine.addMatchers toHaveRequestMethod: (util, customEqualityTesters) -> compare: (request, expectedMethod) -> realMethodMatches = (request.method == expectedMethod) formData = request.data() if u.isFormData(formData) wrappedMethod = formData.get('_method') wrappedMethodMatches = (wrappedMethod == expectedMethod) else wrappedMethod = formData['_method'] wrappedMethodMatches = util.equals(wrappedMethod, [expectedMethod], customEqualityTesters) pass: realMethodMatches || wrappedMethodMatches
Version data entries
11 entries across 11 versions & 1 rubygems