Basic tests added

This commit is contained in:
Christoph Haas 2018-08-14 14:19:07 +02:00
parent 6239fb4dcb
commit 5498e9b9a4
8 changed files with 137 additions and 30 deletions

View file

@ -1,27 +1,3 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
# one:
# name: MyText
# description: MyString
# long_description: MyString
# section: MyString
# maintainer: MyString
# maintainer_email: MyString
# homepage: MyString
# version: MyString
# origin: MyString
# two:
# name: MyText
# description: MyString
# long_description: MyString
# section: MyString
# maintainer: MyString
# maintainer_email: MyString
# homepage: MyString
# version: MyString
# origin: MyString
firefox:
name: firefox
description: A web browser
@ -32,3 +8,43 @@ firefox:
homepage: http://www.mozilla.org/
version: 10.01alpha-7
origin: Debian
vim:
name: vim
description: Vi IMproved - enhanced vi editor
long_description: |
Vim is an almost compatible version of the UNIX editor Vi.
.
Many new features have been added: multi level undo, syntax
highlighting, command line history, on-line help, filename
completion, block operations, folding, Unicode support, etc.
.
This package contains a version of vim compiled with a rather
standard set of features. This package does not provide a GUI
version of Vim. See the other vim-* packages if you need more
(or less).
section: editors
maintainer: Debian Vim Maintainers
maintainer_email: team+vim@tracker.debian.org
homepage: https://vim.sourceforge.io/
version: 2:8.1.0229-1
origin: Ubuntu
<% 100.times do |n| %>
package_<%= n %>:
name: package-<%= n %>
description: Description of package <%= n %>
long_description: |
Long description of package <%= n%> that may be so long that
it spans several lines of text.
.
There might also be several paragraphs in the description text.
.
Like this one.
section: <%= %W(admin cli-mono database debug devel doc editors education games).sample %>
maintainer: Maintainer of package-<%= n %>
maintainer_email: maintainer-<%= n %>@debian.cc
homepage: https://packages.debian.org/package-<%= n %>
version: <%= (rand*10).round(2) %>
origin: <%= %W(ubuntu debian mint opensuse).sample %>
<% end %>

20
test/fixtures/users.yml vendored Normal file
View file

@ -0,0 +1,20 @@
admin:
name: Super Sayajin
created_at: 2018-07-01
updated_at: 2018-07-01
email: admin@debian.ork
sign_in_count: 5
provider: local
admin: 1
encrypted_password: <%= Devise::Encryptor.digest(User, 'adminsecret') %>
normal:
name: Norman Normal
created_at: 2018-06-01
updated_at: 2018-06-01
email: mortal@debian.ork
sign_in_count: 3
provider: local
admin: 0
encrypted_password: <%= Devise::Encryptor.digest(User, 'normalsecret') %>