Skip to content

Commit

Permalink
Fix specs (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcasals authored Feb 3, 2021
1 parent 7cb9098 commit cd76f0d
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/decidim_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:
bundler-cache: true
- run: bundle exec rake db:test:prepare
name: Setup database
- run: bundle exec rspec
name: Run RSpec
- run: bin/rails test -b
name: Run minitest
Empty file removed test/controllers/.keep
Empty file.
26 changes: 0 additions & 26 deletions test/factories/organizations.rb

This file was deleted.

Empty file removed test/fixtures/.keep
Empty file.
Empty file removed test/fixtures/files/.keep
Empty file.
Empty file removed test/helpers/.keep
Empty file.
2 changes: 1 addition & 1 deletion test/integration/http_basic_authentication_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HttpBasicAuthenticationTest < ActionDispatch::IntegrationTest
private

def create_password_protected_organization
create(:organization, http_basic_authentication_protected: true,
FactoryBot.create(:organization, http_basic_authentication_protected: true,
host: 'www.example.com')
end

Expand Down
Empty file removed test/mailers/.keep
Empty file.
Empty file removed test/models/.keep
Empty file.
Empty file removed test/models/fixtures/.keep
Empty file.
Empty file removed test/models/fixtures/files/.keep
Empty file.
10 changes: 8 additions & 2 deletions test/services/vilanova_authorization_handler_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@ class VilanovaAuthorizationHandlerTest < Minitest::Test
include ActiveSupport::Testing::TimeHelpers

def setup
@handle = VilanovaAuthorizationHandler.new(birthday: '22/02/1978',
document_number: '46464646X')
user = FactoryBot.create :user

@handle = VilanovaAuthorizationHandler.new(
user: user,
birthday: '22/02/1978',
document_number: '46464646X'
)

travel_to Date.new(2017, 1, 1)
end

Expand Down
9 changes: 2 additions & 7 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,7 @@
require 'rails/test_help'
require 'decidim/faker/localized'
require 'webmock/minitest'
require "factory_bot"
require 'minitest/mock'

module ActiveSupport
class TestCase

include FactoryBot::Syntax::Methods

end
end
require "decidim/core/test/factories"

0 comments on commit cd76f0d

Please sign in to comment.