mirror of
https://github.com/publiclab/mapknitter.git
synced 2025-12-09 09:49:58 +01:00
* update application.rb * try to complete migration * fixed gemfile.lock * updated to Ruby 2.7.3 * more ruby 2.7.3 updates for dockerfiles * dockerfiles to 2.7.6 * remove local map exporting and gdal * more gdal removal * libappindicator3-7 \ * fixed libindicator3-7 * update for Debian 10 - libayatana-appindicator * all ruby 2.7.6 now * libayatana-appindicator in dockerfiles * remove system test deps for dev dockerfile
32 lines
681 B
Ruby
32 lines
681 B
Ruby
require 'test_helper'
|
|
|
|
class ExportControllerTest < ActionController::TestCase
|
|
def setup
|
|
@map = maps(:saugus)
|
|
end
|
|
|
|
def teardown
|
|
end
|
|
|
|
test 'should display export index' do
|
|
get :index
|
|
assert_response :success
|
|
assert assigns[:exports]
|
|
assert assigns[:day]
|
|
assert assigns[:week]
|
|
end
|
|
|
|
test 'create returns json' do
|
|
url = 'https://example.json/12345/status.json'
|
|
post :create, params: { status_url: url }
|
|
assert_equal url, Export.last.export_url
|
|
end
|
|
|
|
# does not test the exporter client
|
|
test 'should display export status' do
|
|
session[:user_id] = 1
|
|
get :status, params: { id: @map.id}
|
|
assert_response :success
|
|
end
|
|
end
|