1 # Coquelicot: "one-click" file sharing with a focus on users' privacy.
2 # Copyright © 2010-2012 potager.org <jardiniers@potager.org>
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU Affero General Public License as
6 # published by the Free Software Foundation, either version 3 of the
7 # License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU Affero General Public License for more details.
14 # You should have received a copy of the GNU Affero General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 require 'capybara/dsl'
20 describe Coquelicot::Application do
22 Capybara.app = Coquelicot::Application
24 include_context 'with Coquelicot::Application'
30 it 'should display the maximum file size' do
31 find(:xpath, '//label[@for="file"]/following::*[@class="note"]').
32 should have_content("Max. size: #{Coquelicot.settings.max_file_size.as_size}")
36 describe 'get /README' do
40 it 'should display the README file' do
41 title = File.open(File.expand_path('../../../README', __FILE__)) { |f| f.readline.strip }
42 find('h1').should have_content(title)