blob: d120f609b3948042b63c2dafd0787f0df3edee0f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# -*- coding: utf-8 -*-
require 'spec_helper'
describe "Referentials" do
describe "index" do
let!(:referentials) { Array.new(2) { Factory(:referential) } }
it "should show n referentials" do
visit referentials_path
page.should have_content(referentials.first.name)
page.should have_content(referentials.last.name)
end
end
describe "create" do
it "should" do
visit new_referential_path
fill_in "Nom", :with => "Test"
fill_in "Code", :with => "test"
click_button "Créer Espace de données"
Referential.where(:name => "Test").should_not be_nil
# CREATE SCHEMA
end
end
describe "destroy" do
let(:referential) { Factory(:referential) }
it "should" do
visit referential_path(referential)
click_link "Supprimer"
Referential.where(:slug => referential.slug).should be_blank
end
end
end
|