Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flyingzumwalt
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flyingzumwalt/75b6973fab90063059d2 to your computer and use it in GitHub Desktop.
Save flyingzumwalt/75b6973fab90063059d2 to your computer and use it in GitHub Desktop.
hydra-works update errors in sufia

When I update to rely on the latest hydra-works instead of relying on commit 4164209 (see Gemfile.extra), the tests for derivative creation break.

For example:

This line https://github.com/projecthydra/sufia/blob/pcdm/spec/services/create_derivatives_service_spec.rb#L27

       it 'lacks a thumbnail' do
        expect(@generic_file.thumbnail).not_to have_content
       end

Fails with

Failure/Error: expect(@generic_file.thumbnail).not_to have_content
       expected  to respond to `has_content?`

And this line https://github.com/projecthydra/sufia/blob/pcdm/spec/services/create_derivatives_service_spec.rb#L31

      it 'generates a thumbnail on job run' do
        subject.create_derivatives
        expect(@generic_file.thumbnail).to have_content
        expect(@generic_file.thumbnail.mime_type).to eq('image/jpeg')
      end

Fails with

Failure/Error: subject.create_derivatives
     NoMethodError:
       undefined method `has_content?' for nil:NilClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment